git ssb

0+

cel-desktop / ssb-pkg



Tree: d456a6cc8589489e558e6164750474ed2cfc961e

Files: d456a6cc8589489e558e6164750474ed2cfc961e / test / test-50-invalid-unknown-token / main.js

640 bytesRaw
1#!/usr/bin/env node
2
3'use strict';
4
5const assert = require('assert');
6const utils = require('../utils.js');
7
8assert(!module.parent);
9assert(__dirname === process.cwd());
10
11const standard = 'stdout';
12
13let right;
14
15const inspect = (standard === 'stdout')
16 ? [ 'inherit', 'pipe', 'inherit' ]
17 : [ 'inherit', 'inherit', 'pipe' ];
18
19right = utils.pkg.sync([
20 '--target', 'node7-x6',
21 '--output', 'no-output', 'test-x-index.js'
22], { stdio: inspect, expect: 2 });
23
24assert(right.indexOf('\x1B\x5B') < 0, 'colors detected');
25assert(right.indexOf('Error!') >= 0);
26assert(right.indexOf('node7-x6') >= 0);
27assert(right.indexOf('Unknown token') >= 0);
28

Built with git-ssb-web