Files: d456a6cc8589489e558e6164750474ed2cfc961e / test / test-50-package-json-8b / main.js
649 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 target = process.argv[2] || 'host'; |
13 | const output = './run-time/test-output.exe'; |
14 | |
15 | let left, right; |
16 | utils.mkdirp.sync(path.dirname(output)); |
17 | |
18 | left = utils.spawn.sync( |
19 | 'node', [ 'sub/test-x-index.js' ] |
20 | ); |
21 | |
22 | utils.pkg.sync([ |
23 | '--target', target, |
24 | '--output', output, '.' |
25 | ]); |
26 | |
27 | right = utils.spawn.sync( |
28 | './' + path.basename(output), [], |
29 | { cwd: path.dirname(output) } |
30 | ); |
31 | |
32 | assert.equal(left, right); |
33 | utils.vacuum.sync(path.dirname(output)); |
34 |
Built with git-ssb-web