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

Incompatible with Jest's injectGlobals: false #41

Open
thewilkybarkid opened this issue Jul 28, 2023 · 1 comment
Open

Incompatible with Jest's injectGlobals: false #41

thewilkybarkid opened this issue Jul 28, 2023 · 1 comment

Comments

@thewilkybarkid
Copy link

We use the injectGlobals: false in a TypeScript project to avoid having to depend on the @types/jest library. I want to use this library to prevent unexpected console logging, but it's incompatible as it relies on the injected globals (looks like afterEach, beforeEach, and expect).

thewilkybarkid added a commit to PREreview/prereview.org that referenced this issue Jul 28, 2023
I've noticed that some generated text causes KaTeX to log to the console as it's not valid LaTeX (primarily when it contains a `%` character, which triggers a comment, but there's no newline at the end. By default, KaTeX handles these cases but warns about them. This commit turns off those warnings.

I looked at using the 'jest-fail-on-console' library to ensure that dependencies don't output things unexpectedly, but it's currently incompatible with our Jest configuration.

Refs #1124, https://katex.org/docs/options.html, ValentinH/jest-fail-on-console#41
@ValentinH
Copy link
Owner

I see, would you like to make a PR to use @jest/globals ?

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

2 participants