git ssb

0+

cel-desktop / ssb-pkg



Tree: 938b7ea4cfaa3cef6e1690b9ef3ea8bd7a0d2de1

Files: 938b7ea4cfaa3cef6e1690b9ef3ea8bd7a0d2de1 / test / test-50-undo-patch / main.js

622 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 input = './test-x-index.js';
14const output = './test-output.exe';
15
16let right;
17
18utils.pkg.sync([
19 '--target', target,
20 '--output', output, input
21]);
22
23right = utils.spawn.sync(
24 './' + path.basename(output), [ './test-y-index.js' ],
25 { cwd: path.dirname(output),
26 env: { PKG_EXECPATH: 'PKG_INVOKE_NODEJS' } }
27);
28
29assert.equal(right, 'ok\n');
30utils.vacuum.sync(output);
31

Built with git-ssb-web