Files: d456a6cc8589489e558e6164750474ed2cfc961e / test / test-50-class-to-string / main.js
651 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 | |
19 | let right; |
20 | |
21 | utils.pkg.sync([ |
22 | '--target', target, |
23 | '--output', output, input |
24 | ]); |
25 | |
26 | right = utils.spawn.sync( |
27 | './' + path.basename(output), [], |
28 | { cwd: path.dirname(output) } |
29 | ); |
30 | |
31 | assert.equal(right, 'ok\n'); |
32 | utils.vacuum.sync(output); |
33 |
Built with git-ssb-web