git ssb

0+

cel-desktop / ssb-pkg



Tree: 938b7ea4cfaa3cef6e1690b9ef3ea8bd7a0d2de1

Files: 938b7ea4cfaa3cef6e1690b9ef3ea8bd7a0d2de1 / test / test-50-invalid / main.js

666 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 target = process.argv[2] || 'host';
12const standard = 'stdout';
13
14let right;
15
16const inspect = (standard === 'stdout')
17 ? [ 'inherit', 'pipe', 'inherit' ]
18 : [ 'inherit', 'inherit', 'pipe' ];
19
20right = utils.pkg.sync([
21 '--target', target,
22 '--output', 'no-output', '12345'
23], { stdio: inspect, expect: 2 });
24
25assert(right.indexOf('\x1B\x5B') < 0, 'colors detected');
26assert(right.indexOf('Error!') >= 0);
27assert(right.indexOf('does not exist') >= 0);
28assert(right.indexOf('12345') >= 0);
29

Built with git-ssb-web