git ssb

0+

cel-desktop / ssb-pkg



Tree: ca90b5ca0579ebdcc0635288bce4978e3fb200f5

Files: ca90b5ca0579ebdcc0635288bce4978e3fb200f5 / test / test-50-can-include-addon / main.js

780 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 input = './test-x-index.js';
13const output = './test-output.exe';
14const standard = 'stdout';
15
16let right;
17
18const inspect = (standard === 'stdout')
19 ? [ 'inherit', 'pipe', 'inherit' ]
20 : [ 'inherit', 'inherit', 'pipe' ];
21
22right = utils.pkg.sync([
23 '--target', target,
24 '--output', output, input
25], inspect);
26
27assert(right.indexOf('\x1B\x5B') < 0, 'colors detected');
28right = right.replace(/\\/g, '/');
29assert(right.indexOf('test-50-can-include-addon/time.node') === -1);
30assert(right.indexOf('path-to-executable/time.node') === -1);
31utils.vacuum.sync(output);
32

Built with git-ssb-web