git ssb

0+

cel-desktop / ssb-pkg



Tree: e9d9dec1d00ff365112ca0f981bbda15e3682528

Files: e9d9dec1d00ff365112ca0f981bbda15e3682528 / test / test-50-bakery-2 / main.js

802 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 = './run-time/test-output.exe';
15
16let left, right;
17utils.mkdirp.sync(path.dirname(output));
18
19left = utils.spawn.sync(
20 'node', [ '--expose-gc', path.basename(input) ],
21 { cwd: path.dirname(input) }
22);
23
24utils.pkg.sync([
25 '--target', target,
26 '--options', 'expose-gc',
27 '--output', output, input
28]);
29
30right = utils.spawn.sync(
31 './' + path.basename(output), [],
32 { cwd: path.dirname(output) }
33);
34
35assert.equal(left, 'function\n');
36assert.equal(right, 'function\n');
37utils.vacuum.sync(path.dirname(output));
38

Built with git-ssb-web