Fix third party module specs.
This commit is contained in:
parent
c82e73a4ec
commit
e07e26ca76
3 changed files with 10 additions and 21 deletions
|
@ -7,12 +7,11 @@
|
||||||
"coffeelint": "~0.6.1",
|
"coffeelint": "~0.6.1",
|
||||||
"mocha": "~1.13.0",
|
"mocha": "~1.13.0",
|
||||||
"walkdir": "~0.0.7",
|
"walkdir": "~0.0.7",
|
||||||
"runas": "~0.2.0",
|
"runas": "0.3.0",
|
||||||
|
|
||||||
"formidable": "~1.0.14",
|
"formidable": "~1.0.14",
|
||||||
"unzip": "~0.1.9",
|
"unzip": "~0.1.9",
|
||||||
"d3": "~3.3.8",
|
"time": "0.10.0"
|
||||||
"int64-native": "~0.2.0"
|
|
||||||
},
|
},
|
||||||
|
|
||||||
"private": true,
|
"private": true,
|
||||||
|
|
|
@ -2,5 +2,5 @@ process.on('uncaughtException', function(err) {
|
||||||
process.send(err.message);
|
process.send(err.message);
|
||||||
});
|
});
|
||||||
|
|
||||||
require('int64-native');
|
require('time');
|
||||||
process.send('ok');
|
process.send('ok');
|
|
@ -5,11 +5,6 @@ path = require 'path'
|
||||||
describe 'third-party module', ->
|
describe 'third-party module', ->
|
||||||
fixtures = path.join __dirname, 'fixtures'
|
fixtures = path.join __dirname, 'fixtures'
|
||||||
|
|
||||||
describe 'd3', ->
|
|
||||||
it 'can be required', (done) ->
|
|
||||||
require 'd3'
|
|
||||||
done()
|
|
||||||
|
|
||||||
xdescribe 'unzip', ->
|
xdescribe 'unzip', ->
|
||||||
unzip = require 'unzip'
|
unzip = require 'unzip'
|
||||||
|
|
||||||
|
@ -18,21 +13,16 @@ describe 'third-party module', ->
|
||||||
.pipe(unzip.Parse())
|
.pipe(unzip.Parse())
|
||||||
.on('close', done)
|
.on('close', done)
|
||||||
|
|
||||||
describe 'int64-native', ->
|
describe 'time', ->
|
||||||
it 'can be required in renderer', ->
|
it 'can be required in renderer', ->
|
||||||
Int64 = require 'int64-native'
|
time = require 'time'
|
||||||
x = new Int64()
|
now = new time.Date()
|
||||||
y = new Int64(42)
|
now.setTimezone 'America/Los_Angeles'
|
||||||
z = new Int64(0xfedcba98, 0x76543210)
|
assert.equal now.getTimezone(), 'America/Los_Angeles'
|
||||||
w = new Int64('fedcba9876543210')
|
|
||||||
assert.equal x.toString(), '0000000000000000'
|
|
||||||
assert.equal y.toString(), '000000000000002a'
|
|
||||||
assert.equal z.toString(), 'fedcba9876543210'
|
|
||||||
assert.equal w.toString(), 'fedcba9876543210'
|
|
||||||
|
|
||||||
it 'can be required in node binary', (done) ->
|
it 'can be required in node binary', (done) ->
|
||||||
int64_native = path.join fixtures, 'module', 'int64_native.js'
|
time = path.join fixtures, 'module', 'time.js'
|
||||||
child = require('child_process').fork int64_native
|
child = require('child_process').fork time
|
||||||
child.on 'message', (msg) ->
|
child.on 'message', (msg) ->
|
||||||
assert.equal msg, 'ok'
|
assert.equal msg, 'ok'
|
||||||
done()
|
done()
|
||||||
|
|
Loading…
Reference in a new issue