Skip to content

Commit

Permalink
updating tests for tag-renderer
Browse files Browse the repository at this point in the history
  • Loading branch information
jchip authored and divyakarippath committed Jul 17, 2020
1 parent e909552 commit 05d4fbf
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 5 deletions.
1 change: 1 addition & 0 deletions packages/xarc-index-page/src/http-status.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
/* eslint-disable @typescript-eslint/ban-ts-ignore */
// @ts-ignore
import * as HttpStatusCode from "http-status-codes";

Expand Down
5 changes: 3 additions & 2 deletions packages/xarc-index-page/src/webapp.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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),
Expand Down Expand Up @@ -290,12 +290,13 @@ const getContentResolver = (registerOptions, pathData, path) => {
resolved = {
content: {
status: 200,
html: "<!-- SSR disabled by options.serverSideRendring -->"
html: "<!-- SSR disabled by options.serverSideRendering -->"
}
};
}

return resolved.content;
};
};

export { setupOptions, setupPathOptions, makeRouteHandler, resolveContent, getContentResolver };
5 changes: 2 additions & 3 deletions packages/xarc-index-page/test/spec/webapp.spec.ts
Original file line number Diff line number Diff line change
@@ -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";
Expand Down Expand Up @@ -38,4 +38,3 @@ describe("resolveContent", function () {
expect(mod).to.equal(f);
});
});

0 comments on commit 05d4fbf

Please sign in to comment.