git ssb

0+

cel-desktop / ssb-pkg



Tree: 4c58f1c6c3ddb86a97f27f0c84681d201ef1f75f

Files: 4c58f1c6c3ddb86a97f27f0c84681d201ef1f75f / 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