diff --git a/packages/xarc-index-page/src/http-status.ts b/packages/xarc-index-page/src/http-status.ts index 8bd55dc01..55e44d42c 100644 --- a/packages/xarc-index-page/src/http-status.ts +++ b/packages/xarc-index-page/src/http-status.ts @@ -1,3 +1,4 @@ +/* eslint-disable @typescript-eslint/ban-ts-ignore */ // @ts-ignore import * as HttpStatusCode from "http-status-codes"; diff --git a/packages/xarc-index-page/src/webapp.ts b/packages/xarc-index-page/src/webapp.ts index c072a8741..c68567dea 100644 --- a/packages/xarc-index-page/src/webapp.ts +++ b/packages/xarc-index-page/src/webapp.ts @@ -62,7 +62,7 @@ function initializeTemplate( asyncTemplate.initializeRenderer(); } else { const templateFullPath = resolvePath(tmplFile); - const template = require(templateFullPath); + const template = require(templateFullPath); // eslint-disable-line asyncTemplate = new JsxRenderer({ templateFullPath: Path.dirname(templateFullPath), template: _.get(template, "default", template), @@ -290,7 +290,7 @@ const getContentResolver = (registerOptions, pathData, path) => { resolved = { content: { status: 200, - html: "" + html: "" } }; } @@ -298,4 +298,5 @@ const getContentResolver = (registerOptions, pathData, path) => { return resolved.content; }; }; + export { setupOptions, setupPathOptions, makeRouteHandler, resolveContent, getContentResolver }; diff --git a/packages/xarc-index-page/test/spec/webapp.spec.ts b/packages/xarc-index-page/test/spec/webapp.spec.ts index 14258b3d0..2df0394e6 100644 --- a/packages/xarc-index-page/test/spec/webapp.spec.ts +++ b/packages/xarc-index-page/test/spec/webapp.spec.ts @@ -1,8 +1,8 @@ import { expect } from "chai"; -const xstdout = require("xstdout"); +import xstdout = require("xstdout"); import { describe } from "mocha"; -import * as Path from "path"; import * as Webapp from "../../src/Webapp"; + describe("resolveContent", function () { it("should require module with relative path", () => { const f = "./test/data/foo.js"; @@ -38,4 +38,3 @@ describe("resolveContent", function () { expect(mod).to.equal(f); }); }); -