Files: ca90b5ca0579ebdcc0635288bce4978e3fb200f5 / test / test-50-not-found-wording / main.js
782 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 = './run-time/test-output.exe'; |
15 | |
16 | let right; |
17 | utils.mkdirp.sync(path.dirname(output)); |
18 | |
19 | utils.pkg.sync([ |
20 | '--target', target, |
21 | '--output', output, input |
22 | ]); |
23 | |
24 | right = utils.spawn.sync( |
25 | './' + path.basename(output), [], |
26 | { cwd: path.dirname(output) } |
27 | ); |
28 | |
29 | assert( |
30 | right.split('*****')[0].indexOf('was not included into executable at compilation stage') >= 0 |
31 | ); |
32 | |
33 | assert( |
34 | right.split('*****')[1].indexOf('you want to compile the package') >= 0 |
35 | ); |
36 | |
37 | utils.vacuum.sync(path.dirname(output)); |
38 |
Built with git-ssb-web