git ssb

0+

cel-desktop / ssb-pkg



Tree: 67c0e15a98a66eb99db2251478505d6f3d37535c

Files: 67c0e15a98a66eb99db2251478505d6f3d37535c / test / test-50-reject-4 / main.js

925 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
12// only linux has node4
13if (process.platform !== 'linux') return;
14
15const target = 'node4';
16const inputs = { index: './test-x-index.js', warmup: './test-x-warmup.js' };
17const output = './run-time/test-output.exe';
18
19utils.mkdirp.sync(path.dirname(output));
20
21utils.pkg.sync([
22 '--target', target,
23 '--output', output, inputs.warmup // fetch this particular node version
24], { stdio: [ 'inherit', 'inherit', 'pipe' ] });
25
26let right = utils.pkg.sync([
27 '--target', target,
28 '--output', output, inputs.index
29], { stdio: 'pipe' });
30
31assert(right.stdout.indexOf('\x1B\x5B') < 0, 'colors detected');
32assert(right.stdout.indexOf('Warning') >= 0);
33assert(right.stdout.indexOf(target) >= 0);
34utils.vacuum.sync(path.dirname(output));
35

Built with git-ssb-web