summaryrefslogtreecommitdiff
path: root/deps/npm/node_modules/promzard/test/simple.js
diff options
context:
space:
mode:
Diffstat (limited to 'deps/npm/node_modules/promzard/test/simple.js')
-rw-r--r--deps/npm/node_modules/promzard/test/simple.js30
1 files changed, 30 insertions, 0 deletions
diff --git a/deps/npm/node_modules/promzard/test/simple.js b/deps/npm/node_modules/promzard/test/simple.js
new file mode 100644
index 0000000000..bcf8791113
--- /dev/null
+++ b/deps/npm/node_modules/promzard/test/simple.js
@@ -0,0 +1,30 @@
+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);
+});