git ssb

0+

cel-desktop / ssb-pkg



Tree: ca90b5ca0579ebdcc0635288bce4978e3fb200f5

Files: ca90b5ca0579ebdcc0635288bce4978e3fb200f5 / test / test-50-reject-6 / main.js

970 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 and alpine have node6
13if (process.platform !== 'linux' && process.platform !== 'alpine') return;
14
15const target = 'node6';
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