Skip to content

Commit 96bb148

Browse files
committed
Merge pull request nwjs#1398 from kingFighter/tests
[test] update test case for building native modules(node-dtrace-provider...
2 parents 798b7fb + be5689f commit 96bb148

File tree

3 files changed

+13
-1
lines changed

3 files changed

+13
-1
lines changed

tests/automatic_tests/node/mocha_test.js

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -143,7 +143,13 @@ describe('module', function() {
143143
});
144144

145145
it('native modules without handle scope', function() {
146-
require('./node_modules/nw_test_loop_without_handle');
146+
require('./node_modules/nw_test_loop_without_handle');
147+
});
148+
149+
it('native modules should work', function() {
150+
var nativeModules = new Array("dtrace-provider", "ref", "lame");
151+
for (var i = 0; i < nativeModules.length; i++)
152+
assert.equal((typeof require(nativeModules[i])), "object");
147153
});
148154
});
149155
});

tests/package.json

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,9 @@
2020
"mocha": "1.7.4",
2121
"nw_test_loop": "git+https://github.com/owenc4a4/nw_test_loop_without_handle.git",
2222
"bignum": "git+https://github.com/owenc4a4/bignum.git",
23+
"node-dtrace-provider": "git+https://github.com/chrisa/node-dtrace-provider.git",
24+
"ref": "git+https://github.com/TooTallNate/ref.git",
25+
"node-lame": "git+https://github.com/TooTallNate/node-lame.git",
2326
"fs-extra": "*"
2427
},
2528
"user-agent": "%name/%nwver/%ver/%webkit_ver/%osinfo",

tools/build_native_modules.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,9 @@
44

55
native_modules = ['nw_test_loop_without_handle',
66
'bignum',
7+
'dtrace-provider',
8+
'ref',
9+
'lame',
710
];
811

912
script_dir = os.path.dirname(__file__)

0 commit comments

Comments
 (0)