git ssb

1+

Dominic / pull-stream-workshop



Tree: 079013977dd1a81caf9ed4717492ef3b9f722db0

Files: 079013977dd1a81caf9ed4717492ef3b9f722db0 / verify.js

610 bytesRaw
1var path = require('path')
2var tests = [
3 require('./helpers/sink'),
4 require('./helpers/source'),
5 require('./helpers/map'),
6 require('./helpers/pull'),
7 require('./helpers/take')
8]
9
10if(process.argv.length !== 4) {
11 console.error('usage: verify.js [1-5] script.js')
12 process.exit(1)
13}
14
15var i = +process.argv[2] - 1
16
17if(isNaN(i)) throw new Error('first argument must be integer, 1 - 5')
18if(!tests[i])
19 throw new Error('there are no tests for that exercise, expected')
20
21var test = tests[i]
22console.log('', i, test)
23console.log(path.resolve(process.argv[3]))
24test(require(path.resolve(process.argv[3])))
25

Built with git-ssb-web