git ssb

0+

cel-desktop / ssb-pkg



Tree: ca90b5ca0579ebdcc0635288bce4978e3fb200f5

Files: ca90b5ca0579ebdcc0635288bce4978e3fb200f5 / test / test-50-invalid-package-json-bin-2 / main.js

669 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', '.'
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('package.json') >= 0);
29

Built with git-ssb-web