test(screenshotter): move coverage to Jest (#2324)

* Move screenshotter coverage collection to Jest testing

Fixes #1885.

* Update screenshotter-spec.js

* Update screenshotter-spec.js

Co-authored-by: Kevin Barabash <kevinb@khanacademy.org>
This commit is contained in:
ylemkimon
2020-08-03 06:58:40 +09:00
committed by GitHub
parent 1ffb638da8
commit f9cd9de100
2 changed files with 23 additions and 15 deletions

View File

@@ -0,0 +1,19 @@
const data = require("./screenshotter/ss_data");
describe("Screenshotter item", function() {
for (const key in data) {
if (data.hasOwnProperty(key)) {
const item = data[key];
it(`"${item.tex}" should build successfully`, function() {
expect(item.tex).toBuild({
macros: item.macros,
displayMode: item.display,
throwOnError: !item.noThrow,
errorColor: item.errorColor,
strict: false,
trust: true, // trust test inputs
});
});
}
}
});