Commit 595dd337 authored by Guillaume's avatar Guillaume
Browse files

add tests

parent 122d998e
This diff is collapsed.
const TIMEOUT = 10000; // Some book might take longer than this to renderer
describe("default", () => {
let page;
beforeAll(async () => {
page = await loadPage("math/math.html");
return page.rendered;
}, TIMEOUT);
afterAll(async () => {
if (!DEBUG) {
await page.close();
}
});
it("math elements should not throw an exception", async () => {
let count = await page.$$eval("math" , (r) => {
// eslint-disable-next-line no-console
return r.length;
});
expect(count).toEqual(96);
});
});
This diff is collapsed.
const TIMEOUT = 10000; // Some book might take longer than this to renderer
describe("default", () => {
let page;
beforeAll(async () => {
page = await loadPage("math/mathjax.html");
return page.rendered;
}, TIMEOUT);
afterAll(async () => {
if (!DEBUG) {
await page.close();
}
});
it("mathjax elements should not throw an exception", async () => {
let count = await page.$$eval("mjx-container" , (r) => {
// eslint-disable-next-line no-console
return r.length;
});
expect(count).toEqual(96);
});
});
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment