git ssb

0+

cel-desktop / ssb-pkg



Tree: 65191f9a9664f013ebe726bb95a1a54b086e1bd5

Files: 65191f9a9664f013ebe726bb95a1a54b086e1bd5 / 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