git ssb

0+

cel-desktop / ssb-pkg



Tree: ca90b5ca0579ebdcc0635288bce4978e3fb200f5

Files: ca90b5ca0579ebdcc0635288bce4978e3fb200f5 / test / test-78-verify-pkg-version / main.js

668 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 left, right;
17
18left = require('../../package.json').version;
19
20utils.pkg.sync([
21 '--target', target,
22 '--output', output, input
23]);
24
25right = utils.spawn.sync(
26 './' + path.basename(output), [],
27 { cwd: path.dirname(output) }
28);
29
30assert.equal(left[0], '4');
31assert.equal(right[0], '4');
32assert.equal(left + '\n', right);
33utils.vacuum.sync(output);
34

Built with git-ssb-web