Files: d456a6cc8589489e558e6164750474ed2cfc961e / test / test-50-fs-runtime-layer-3 / main.js
803 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 input = './test-x-index.js'; |
14 | const output = './test-output.exe'; |
15 | |
16 | let right; |
17 | |
18 | utils.pkg.sync([ |
19 | '--target', target, |
20 | '--output', output, input |
21 | ]); |
22 | |
23 | right = utils.spawn.sync( |
24 | './' + path.basename(output), [], |
25 | { cwd: path.dirname(output) } |
26 | ); |
27 | |
28 | assert.equal(right, |
29 | 'true\n' + |
30 | 'false\n' + |
31 | 'Cannot write to packaged file\n' + |
32 | 'true\n' + |
33 | 'closed\n' + |
34 | 'false\n' + |
35 | 'Cannot write to packaged file\n' + |
36 | 'Cannot write to packaged file\n' + |
37 | 'undefined\n' + |
38 | 'Cannot write to packaged file\n' + |
39 | 'undefined\n' |
40 | ); |
41 | |
42 | utils.vacuum.sync(output); |
43 |
Built with git-ssb-web