Files: 65191f9a9664f013ebe726bb95a1a54b086e1bd5 / test / test-50-no-super-in-constructor / main.js
691 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 host = 'node' + process.version.match(/^v(\d+)/)[1]; |
13 | const target = process.argv[2] || host; |
14 | const input = './test-x-index.js'; |
15 | const output = './test-output.exe'; |
16 | |
17 | if (/^(node|v)?0/.test(target)) return; |
18 | if (/^(node|v)?4/.test(target)) return; |
19 | |
20 | let right; |
21 | |
22 | utils.pkg.sync([ |
23 | '--target', target, |
24 | '--output', output, input |
25 | ]); |
26 | |
27 | right = utils.spawn.sync( |
28 | './' + path.basename(output), [], |
29 | { cwd: path.dirname(output) } |
30 | ); |
31 | |
32 | assert.equal(right, 'ok\n'); |
33 | utils.vacuum.sync(output); |
34 |
Built with git-ssb-web