Files: d456a6cc8589489e558e6164750474ed2cfc961e / test / test-50-extensions / main.js
696 bytesRaw
1 | |
2 | |
3 | /* eslint-disable strict */ |
4 | |
5 | 'use strict'; |
6 | |
7 | const path = require('path'); |
8 | const assert = require('assert'); |
9 | const utils = require('../utils.js'); |
10 | |
11 | assert(!module.parent); |
12 | assert(__dirname === process.cwd()); |
13 | |
14 | const target = process.argv[2] || 'host'; |
15 | const input = './test-x-index.js'; |
16 | const output = './test-output.exe'; |
17 | |
18 | let left, right; |
19 | |
20 | left = utils.spawn.sync( |
21 | 'node', [ path.basename(input) ], |
22 | { cwd: path.dirname(input) } |
23 | ); |
24 | |
25 | utils.pkg.sync([ |
26 | '--public', |
27 | '--target', target, |
28 | '--output', output, input |
29 | ]); |
30 | |
31 | right = utils.spawn.sync( |
32 | './' + path.basename(output), [], |
33 | { cwd: path.dirname(output) } |
34 | ); |
35 | |
36 | assert.equal(left, right); |
37 | utils.vacuum.sync(output); |
38 |
Built with git-ssb-web