Skip to content

Commit

Permalink
Add failing test for native module re-requires.
Browse files Browse the repository at this point in the history
  • Loading branch information
rosston committed Nov 1, 2016
1 parent a5c87d9 commit 86805d7
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 1 deletion.
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
"license": "MIT",
"scripts": {
"pretest": "eslint benchmarks lib test",
"test": "mocha --recursive test",
"test": "mocha --recursive -r native-module/hello test",
"bench": "bench benchmarks"
},
"devDependencies": {
Expand All @@ -35,6 +35,7 @@
"eslint": "2.13.0",
"eslint-config-tschaub": "6.0.0",
"fs-extra": "^0.30.0",
"native-module": "^0.11.3",
"mocha": "3.1.2",
"rimraf": "2.5.4"
},
Expand Down
10 changes: 10 additions & 0 deletions test/integration/native-module-require.spec.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
/**
* native-module MUST have been pre-required by mocha in order for this test to
* fail properly.
*/
describe('native module re-requires', function() {
it('should work', function() {
require('../../lib/index');
require('native-module/hello');
});
});

0 comments on commit 86805d7

Please sign in to comment.