git ssb

0+

cel-desktop / ssb-pkg



Tree: efcf9fd06b02fa9bcd28681b4c777224e19702bb

Files: efcf9fd06b02fa9bcd28681b4c777224e19702bb / test / test-50-no-super-in-constructor / main.js

691 bytesRaw
1#!/usr/bin/env node
2
3'use strict';
4
5const path = require('path');
6const assert = require('assert');
7const utils = require('../utils.js');
8
9assert(!module.parent);
10assert(__dirname === process.cwd());
11
12const host = 'node' + process.version.match(/^v(\d+)/)[1];
13const target = process.argv[2] || host;
14const input = './test-x-index.js';
15const output = './test-output.exe';
16
17if (/^(node|v)?0/.test(target)) return;
18if (/^(node|v)?4/.test(target)) return;
19
20let right;
21
22utils.pkg.sync([
23 '--target', target,
24 '--output', output, input
25]);
26
27right = utils.spawn.sync(
28 './' + path.basename(output), [],
29 { cwd: path.dirname(output) }
30);
31
32assert.equal(right, 'ok\n');
33utils.vacuum.sync(output);
34

Built with git-ssb-web