MathJax-node
MathJax-node copied to clipboard
Missing backslash in test coverage
The asset file test/assets/test.js
for the test test/config-third-party-extensions.js
is missing a backslash. Indeed the file is
MathJax.Hub.Register.StartupHook("TeX Jax Ready", function () {
MathJax.InputJax.TeX.Definitions.Add({
macros: {
test: ["Macro", "\text{This is a Test}"]
}
});
});
MathJax.Ajax.loadComplete("[test]/test.js");
When it should be (\text
-> \\text
line 4):
MathJax.Hub.Register.StartupHook("TeX Jax Ready", function () {
MathJax.InputJax.TeX.Definitions.Add({
macros: {
test: ["Macro", "\\text{This is a Test}"]
}
});
});
MathJax.Ajax.loadComplete("[test]/test.js");
This shows that error checking is not enough for mathjax-node test covering: probably
one should compare data.mml
and/or data.html
to the expected values and not merely check data.errors
.
When it should be (\text -> \text line 4):
True.
This shows that error checking is not enough for mathjax-node test covering: probably one should compare data.mml and/or data.html to the expected values and not merely check data.errors.
I disagree. We don't test the behavior of the macro but the loading of an extension. In other words, the point of the test is that the macro can be used at all (as opposed to throwing an "unknown macro" error).
So fixing this typo would be nice but the test is ok as is, I think.
test is ok as is, I think
I agree.