1 | var assert = require('assert')
|
2 |
|
3 | var lib = require('./lib')
|
4 |
|
5 | try {
|
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 |