-
Notifications
You must be signed in to change notification settings - Fork 55
Open
Description
Using mocha, if I write a test like:
suite("main", function() {
var Squire = requirejs('squirejs');
var injector = new Squire();
var myStub;
setup("setup", function() {
myStub = { someObjectDefinition: true };
injector.mock("myModule/someDependency", myStub);
}
teardown("teardown", function() {
injector.clean();
}
test("Some test", injector.run(["myModule"], function(myModule) {
// Test something
assert.isTrue(whatever);
}));
});
...the test never runs. If I change injector.run(["myModule", function(myModule) { ... })
to injector.run(["myModule", "mocks"], function(myModule, mock) {...}
, the test runs, even though I have no use for the mock
parameter. The same issue seems to occur when using injector.require
within the test function instead of using injector.run
as the test function.
Metadata
Metadata
Assignees
Labels
No labels