diff options
Diffstat (limited to 'tests')
-rw-r--r-- | tests/js/hero.mjs | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/tests/js/hero.mjs b/tests/js/hero.mjs index 3cc5d30..3d0751c 100644 --- a/tests/js/hero.mjs +++ b/tests/js/hero.mjs @@ -36,6 +36,7 @@ import { makeReopeningPipeReader, makePipeReaderFn, buildRoutes, + buildTable, promisifyServer, buildServer, } from "../../src/hero.mjs"; @@ -1648,6 +1649,17 @@ const test_buildRoutes = async t => { }); }; +const test_buildTable = async t => { + t.start("buildTable()"); + + await t.test('we just add the "interceptors" key to what buildRoutes() gives us', () => { + assert.deepEqual( + buildTable([], [ "i1", "i2" ]), + { interceptors: [ "i1", "i2" ] }, + ); + }); +}; + const test_promisifyServer = async t => { t.start("promisifyServer()"); @@ -1728,6 +1740,7 @@ await runner.runTests([ test_actionsFn, test_lineHandlerFn, test_buildRoutes, + test_buildTable, test_rmIf, test_mkfifo, test_makeLineEmitter, |