Files: ca90b5ca0579ebdcc0635288bce4978e3fb200f5 / test / test-50-debug / main.js
595 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 | utils.pkg.sync([ |
17 | '--target', target, |
18 | '--output', output, input |
19 | ]); |
20 | |
21 | utils.spawn.sync( |
22 | './' + path.basename(output), |
23 | [ '--debug' ], |
24 | { cwd: path.dirname(output), |
25 | env: { PKG_EXECPATH: 'PKG_INVOKE_NODEJS' }, |
26 | stdio: 'pipe', expect: 9 } |
27 | ); |
28 | |
29 | utils.vacuum.sync(output); |
30 |
Built with git-ssb-web