Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Missing backslash in test coverage #437

Open
taurgal opened this issue Mar 18, 2019 · 2 comments
Open

Missing backslash in test coverage #437

taurgal opened this issue Mar 18, 2019 · 2 comments

Comments

@taurgal
Copy link

taurgal commented Mar 18, 2019

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.

@pkra
Copy link
Contributor

pkra commented Mar 18, 2019

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.

@dpvc
Copy link
Member

dpvc commented Mar 18, 2019

test is ok as is, I think

I agree.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants