Skip to content

Commit

Permalink
Fixes for jasmine2 support with the new node-haste.
Browse files Browse the repository at this point in the history
  • Loading branch information
cpojer committed Dec 7, 2015
1 parent 4dd1fd3 commit 5fa1d3e
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,9 @@ describe('HasteModuleLoader', function() {
return buildLoader().then(function(loader) {
expect(function() {
loader.requireModule(rootPath, 'DoesntExist');
}).toThrow('Cannot find module \'DoesntExist\' from \'root.js\'');
}).toThrow(
new Error('Cannot find module \'DoesntExist\' from \'root.js\'')
);
});
});

Expand Down Expand Up @@ -88,7 +90,7 @@ describe('HasteModuleLoader', function() {
expect(function() {
loader.requireModule(rootPath, './DoesntExist');
}).toThrow(
'Cannot find module \'./DoesntExist\' from \'root.js\''
new Error('Cannot find module \'./DoesntExist\' from \'root.js\'')
);
});
});
Expand Down
2 changes: 1 addition & 1 deletion src/testRunners/jasmine/jasmine2.js
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ function jasmine2(config, environment, moduleLoader, testPath) {
});

if (!config.persistModuleRegistryBetweenSpecs) {
moduleLoader.getJestRuntime().resetModuleRegistry();
moduleLoader.resetModuleRegistry();
}
});

Expand Down

0 comments on commit 5fa1d3e

Please sign in to comment.