mirror of
https://github.com/Smaug123/KaTeX
synced 2025-10-04 18:58:39 +00:00
* copy katex-a11y.js from webapp to contrib/to-a11y-string.js * first pass of updating to-a11y-string to use flow * Set up test harness and write some tests - add flow types for jest - create wallaby config file - add prettier as a dep and set up .prettierrc so that we use .toMatchInlineSnapshot() and have jest insert the snapshot for us - add lots of TODOs (I'll create tickets for these later) * Add some to get the tests passing for now * remove commented out parts of wallaby.js config file * remove some stale strings, fix flow issue, add more coverage * add , add few more tests, handle middle * fix minor nits in tests * rename to-a11y-string to render-a11y-string, updatte webpack config to build extension * add test for \boxed * remove commented out code
40 lines
1014 B
JavaScript
40 lines
1014 B
JavaScript
const babelConfig = require("./babel.config.js");
|
|
|
|
module.exports = function(wallaby) {
|
|
const tests = [
|
|
"test/*-spec.js",
|
|
"contrib/**/test/*-spec.js",
|
|
];
|
|
|
|
return {
|
|
tests,
|
|
|
|
// Wallaby needs to know about all files that may be loaded because
|
|
// of running a test.
|
|
files: [
|
|
"src/**/*.js",
|
|
"test/**/*.js",
|
|
"contrib/**/*.js",
|
|
"submodules/**/*.js",
|
|
"katex.js",
|
|
|
|
// These paths are excluded.
|
|
...tests.map((test) => `!${test}`),
|
|
],
|
|
|
|
// Wallaby does its own compilation of .js files to support its
|
|
// advanced logging features. Wallaby can't parse the flow and
|
|
// JSX in our source files so need to provide a babel configuration.
|
|
compilers: {
|
|
"**/*.js": wallaby.compilers.babel(babelConfig),
|
|
},
|
|
|
|
env: {
|
|
type: "node",
|
|
runner: "node",
|
|
},
|
|
|
|
testFramework: "jest",
|
|
};
|
|
};
|