Is intern use requireJs to load the test? I'm using this approach to mock out dependencies for the module I wanna test, so I wonder if this will work with Intern as well.
相关问题
- Dependencies while implementing Mocking in Junit4
- How to unit test a reactive component where ngCont
- Access for global variables JavaScript unit testin
- Mockito : How to test my Dao with mocking?
- Googletest Parametrized tests crash
相关文章
- How to replace file-access references for a module
- How to mock methods return object with deleted cop
- What is a good way of cleaning up after a unit tes
-
EF6 DbSet
returns null in Moq - React testing library: Test attribute / prop
- React/JestJS/Enzyme: How to test for ref function?
- python unit testing methods inside of classes
- Running into System.MissingMethodException: Method
Intern uses the Dojo Toolkit’s AMD loader. To mock out dependencies, you should be able to just use the standard AMD
map
feature. In your Intern configuration file, something like this should do what you need:See https://github.com/amdjs/amdjs-api/wiki/Common-Config#map- for more information on
map
.Not sure if this would be helpful. I've created a module for mocking module dependencies using the Dojo loader: https://github.com/stdavis/StubModule
Works well for my needs. I don't see any reason why it wouldn't work in intern but haven't tried it yet.