git ssb

0+

cel-desktop / ssb-pkg



Tree: 938b7ea4cfaa3cef6e1690b9ef3ea8bd7a0d2de1

Files: 938b7ea4cfaa3cef6e1690b9ef3ea8bd7a0d2de1 / test / test-50-package-json-2 / main.js

649 bytesRaw
1#!/usr/bin/env node
2
3'use strict';
4
5const path = require('path');
6const assert = require('assert');
7const utils = require('../utils.js');
8
9assert(!module.parent);
10assert(__dirname === process.cwd());
11
12const target = process.argv[2] || 'host';
13const output = './run-time/test-output.exe';
14
15let left, right;
16utils.mkdirp.sync(path.dirname(output));
17
18left = utils.spawn.sync(
19 'node', [ 'sub/test-x-index.js' ]
20);
21
22utils.pkg.sync([
23 '--target', target,
24 '--output', output, '.'
25]);
26
27right = utils.spawn.sync(
28 './' + path.basename(output), [],
29 { cwd: path.dirname(output) }
30);
31
32assert.equal(left, right);
33utils.vacuum.sync(path.dirname(output));
34

Built with git-ssb-web