git ssb

0+

cel-desktop / ssb-pkg



Tree: efcf9fd06b02fa9bcd28681b4c777224e19702bb

Files: efcf9fd06b02fa9bcd28681b4c777224e19702bb / test / test-50-class-to-string / main.js

651 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 host = 'node' + process.version.match(/^v(\d+)/)[1];
13const target = process.argv[2] || host;
14const input = './test-x-index.js';
15const output = './test-output.exe';
16
17if (/^(node|v)?0/.test(target)) return;
18
19let right;
20
21utils.pkg.sync([
22 '--target', target,
23 '--output', output, input
24]);
25
26right = utils.spawn.sync(
27 './' + path.basename(output), [],
28 { cwd: path.dirname(output) }
29);
30
31assert.equal(right, 'ok\n');
32utils.vacuum.sync(output);
33

Built with git-ssb-web