]> 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/validate.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 / validate.js
1
2 var promzard = require('../')
3 var test = require('tap').test
4
5 test('validate', function (t) {
6   t.plan(2)
7   var ctx = { tmpdir : '/tmp' }
8   var file = __dirname + '/validate.input'
9   promzard(file, ctx, function (er, found) {
10     t.ok(!er)
11     var wanted = { name: 'cool' }
12     t.same(found, wanted)
13   })
14   setTimeout(function () {
15     process.stdin.emit('data', 'not cool\n')
16   }, 100)
17   setTimeout(function () {
18     process.stdin.emit('data', 'cool\n')
19   }, 200)
20 })