git ssb

0+

cel-desktop / ssb-pkg



Tree: 1eb144e388da5f1a3466703f56ac4ab591d700fc

Files: 1eb144e388da5f1a3466703f56ac4ab591d700fc / test / test-50-for-await-of / main.js

782 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;
19if (/^(node|v)?6/.test(target)) return;
20if (/^(node|v)?8/.test(target)) return;
21
22let right;
23
24utils.pkg.sync([
25 '--target', target,
26 '--output', output, input
27]);
28
29right = utils.spawn.sync(
30 './' + path.basename(output), [],
31 { cwd: path.dirname(output) }
32);
33
34assert.equal(right, '1\n2\n3\n4\n5\n');
35utils.vacuum.sync(output);
36

Built with git-ssb-web