Files: 67c0e15a98a66eb99db2251478505d6f3d37535c / test / test-50-package-json-3 / main.js
581 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 = './test-output.exe'; |
14 | |
15 | let left, right; |
16 | |
17 | left = utils.spawn.sync( |
18 | 'node', [ 'test-x-index.js' ] |
19 | ); |
20 | |
21 | utils.pkg.sync([ |
22 | '--target', target, |
23 | '--output', output, '.' |
24 | ]); |
25 | |
26 | right = utils.spawn.sync( |
27 | './' + path.basename(output), [], |
28 | { cwd: path.dirname(output) } |
29 | ); |
30 | |
31 | assert.equal(left, right); |
32 | utils.vacuum.sync(output); |
33 |
Built with git-ssb-web