mirror of
https://github.com/Smaug123/KaTeX
synced 2025-10-05 19:28:39 +00:00
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:
19
test/screenshotter-spec.js
Normal file
19
test/screenshotter-spec.js
Normal 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
|
||||
});
|
||||
});
|
||||
}
|
||||
}
|
||||
});
|
Reference in New Issue
Block a user