• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1var test = require('tap').test;
2var promzard = require('../');
3
4test('simple', function (t) {
5    t.plan(1);
6
7    var ctx = { tmpdir : '/tmp' }
8    var file = __dirname + '/simple.input';
9    promzard(file, ctx, function (err, output) {
10        t.same(
11            {
12                a : 3,
13                b : '!2b',
14                c : {
15                    x : 55,
16                    y : '/tmp/y/file.txt',
17                }
18            },
19            output
20        );
21    });
22
23    setTimeout(function () {
24        process.stdin.emit('data', '\n');
25    }, 100);
26
27    setTimeout(function () {
28        process.stdin.emit('data', '55\n');
29    }, 200);
30});
31