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