]> gerrit.simantics Code Review - simantics/district.git/blob - org.simantics.maps.server/node/node-v4.8.0-win-x64/node_modules/npm/node_modules/init-package-json/node_modules/promzard/test/simple.js
Adding integrated tile server
[simantics/district.git] / org.simantics.maps.server / node / node-v4.8.0-win-x64 / node_modules / npm / node_modules / init-package-json / node_modules / promzard / test / simple.js
1 var test = require('tap').test;
2 var promzard = require('../');
3
4 test('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 });