git ssb

0+

cel-desktop / ssb-pkg



Tree: 65191f9a9664f013ebe726bb95a1a54b086e1bd5

Files: 65191f9a9664f013ebe726bb95a1a54b086e1bd5 / test / test-50-many-arrow-functions / main.js

961 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
17const arch = process.arch; // TODO extract arch from `target` once it contains
18if (arch === 'arm') return;
19const version1 = process.version;
20if (/^(node|v)?0/.test(version1)) return;
21const version2 = target;
22if (/^(node|v)?0/.test(version2)) return;
23
24let left, right;
25
26left = utils.spawn.sync(
27 'node', [ path.basename(input) ],
28 { cwd: path.dirname(input) }
29);
30
31utils.pkg.sync([
32 '--target', target,
33 '--output', output, input
34]);
35
36right = utils.spawn.sync(
37 './' + path.basename(output), [],
38 { cwd: path.dirname(output) }
39);
40
41assert.equal(left, right);
42utils.vacuum.sync(output);
43

Built with git-ssb-web