Files: e9d9dec1d00ff365112ca0f981bbda15e3682528 / test / test-50-object-spread / main.js
731 bytesRaw
1 | |
2 | |
3 | 'use strict'; |
4 | |
5 | const path = require('path'); |
6 | const assert = require('assert'); |
7 | const utils = require('../utils.js'); |
8 | |
9 | assert(!module.parent); |
10 | assert(__dirname === process.cwd()); |
11 | |
12 | const host = 'node' + process.version.match(/^v(\d+)/)[1]; |
13 | const target = process.argv[2] || host; |
14 | const input = './test-x-index.js'; |
15 | const output = './test-output.exe'; |
16 | |
17 | if (/^(node|v)?0/.test(target)) return; |
18 | if (/^(node|v)?4/.test(target)) return; |
19 | if (/^(node|v)?6/.test(target)) return; |
20 | |
21 | let right; |
22 | |
23 | utils.pkg.sync([ |
24 | '--target', target, |
25 | '--output', output, input |
26 | ]); |
27 | |
28 | right = utils.spawn.sync( |
29 | './' + path.basename(output), [], |
30 | { cwd: path.dirname(output) } |
31 | ); |
32 | |
33 | assert.equal(right, 'ok\n'); |
34 | utils.vacuum.sync(output); |
35 |
Built with git-ssb-web