1 var test = require('tap').test;
2 var promzard = require('../');
4 if (process.argv[2] === 'child') {
8 test('exports', function (t) {
11 var spawn = require('child_process').spawn
12 var child = spawn(process.execPath, [__filename, 'child'])
15 child.stderr.on('data', function (c) {
19 setTimeout(function () {
20 child.stdin.write('\n');
22 setTimeout(function () {
23 child.stdin.end('55\n');
26 child.on('close', function () {
27 console.error('output=%j', output)
28 output = JSON.parse(output)
34 y : '/tmp/y/file.txt',
42 var ctx = { tmpdir : '/tmp' }
43 var file = __dirname + '/exports.input';
45 promzard(file, ctx, function (err, output) {
46 console.error(JSON.stringify(output))