mirror of
https://github.com/nodejs/node.git
synced 2025-05-17 02:30:33 +00:00

PR-URL: https://github.com/nodejs/node/pull/30533 Reviewed-By: Rich Trott <rtrott@gmail.com> Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de> Reviewed-By: Jiawen Geng <technicalcute@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
31 lines
669 B
JavaScript
31 lines
669 B
JavaScript
var test = require('tap').test;
|
|
var promzard = require('../');
|
|
|
|
test('simple', function (t) {
|
|
t.plan(1);
|
|
|
|
var ctx = { tmpdir : '/tmp' }
|
|
var file = __dirname + '/simple.input';
|
|
promzard(file, ctx, function (err, output) {
|
|
t.same(
|
|
{
|
|
a : 3,
|
|
b : '!2b',
|
|
c : {
|
|
x : 55,
|
|
y : '/tmp/y/file.txt',
|
|
}
|
|
},
|
|
output
|
|
);
|
|
});
|
|
|
|
setTimeout(function () {
|
|
process.stdin.emit('data', '\n');
|
|
}, 100);
|
|
|
|
setTimeout(function () {
|
|
process.stdin.emit('data', '55\n');
|
|
}, 200);
|
|
});
|