Files: ca90b5ca0579ebdcc0635288bce4978e3fb200f5 / test / test-50-cannot-include-df / main.js
772 bytesRaw
1 | |
2 | |
3 | 'use strict'; |
4 | |
5 | const assert = require('assert'); |
6 | const utils = require('../utils.js'); |
7 | |
8 | assert(!module.parent); |
9 | assert(__dirname === process.cwd()); |
10 | |
11 | const target = process.argv[2] || 'host'; |
12 | const input = './test-x-index.js'; |
13 | const output = './test-output.exe'; |
14 | const standard = 'stdout'; |
15 | |
16 | let right; |
17 | |
18 | const inspect = (standard === 'stdout') |
19 | ? [ 'inherit', 'pipe', 'inherit' ] |
20 | : [ 'inherit', 'inherit', 'pipe' ]; |
21 | |
22 | right = utils.pkg.sync([ |
23 | '--target', target, |
24 | '--output', output, input |
25 | ], inspect); |
26 | |
27 | assert(right.indexOf('\x1B\x5B') < 0, 'colors detected'); |
28 | right = right.replace(/\\/g, '/'); |
29 | assert(right.indexOf('node_modules/some-package/fromFile') >= 0); |
30 | assert(right.indexOf('path-to-executable/toFile') >= 0); |
31 | utils.vacuum.sync(output); |
32 |
Built with git-ssb-web