UNPKG

552 BJavaScriptView Raw
1var assert = require('assert')
2
3var lib = require('./lib')
4
5try {
6 var expectations = {
7 "ok": lib.bam.m,
8 "yea": lib.bar.f,
9 "definitely": lib.bar.fing,
10 "yes": lib.Foo.l,
11 "yep": lib.Foo.ls
12 }
13
14 var keys = Object.keys(expectations)
15 keys.forEach(function(expectation) {
16 assert.equal(expectations[expectation](), expectation);
17 })
18
19 console.log(keys.length + " tests passed.");
20
21} catch (error) {
22 console.log("Test Failed:");
23 console.log("Expected: " + error.expected);
24 console.log(" Actual: " + error.actual);
25}
\No newline at end of file