git ssb

0+

cel-desktop / ssb-pkg



Tree: efcf9fd06b02fa9bcd28681b4c777224e19702bb

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

808 bytesRaw
1#!/usr/bin/env node
2
3'use strict';
4
5const assert = require('assert');
6const path = require('path');
7const utils = require('../utils.js');
8
9assert(!module.parent);
10assert(__dirname === process.cwd());
11
12const target = process.argv[2] || 'host';
13const input = './test-x-index.js';
14const output = './test-output.exe';
15const standard = 'stdout';
16
17let right;
18
19const inspect = (standard === 'stdout')
20 ? [ 'inherit', 'pipe', 'inherit' ]
21 : [ 'inherit', 'inherit', 'pipe' ];
22
23right = utils.pkg.sync([
24 '--target', target,
25 '--output', output, input
26], inspect);
27
28assert(right.indexOf('\x1B\x5B') < 0, 'colors detected');
29assert(right.indexOf('Warning') >= 0);
30assert(right.indexOf('Entry \'main\' not found') >= 0);
31assert(right.indexOf('crusader' + path.sep + 'package.json') >= 0);
32
33utils.vacuum.sync(output);
34

Built with git-ssb-web