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

Support for other backCompat settings? #3299

Closed
edemaine opened this issue Apr 14, 2017 · 4 comments
Closed

Support for other backCompat settings? #3299

edemaine opened this issue Apr 14, 2017 · 4 comments

Comments

@edemaine
Copy link
Contributor

According to KaTeX/KaTeX#664 , Jest sets document.compatMode = 'BackCompat' and there isn't an option to override. This is not a great choice for modern web apps. Could there be support for modifying this setting in configuration/command line?

(I'm coming from the KaTeX development side, so I'm a little lost on the sense in which Jest even has a web browser in it... DOM simulation perhaps? Apologies if this issue is actually farther upstream, or if there already is an option to override...)

@thymikee
Copy link
Collaborator

Jest uses JSDOM to emulate browser environment and it doesn't actually work in real browsers currently. Currently we render nothing as a document, hence the quirk mode.

@cpojer any special reason, why we're doing this?

changing undefined to '<!DOCTYPE html> should fix this and doesn't break anything in our test suite.

this.document = require('jsdom').jsdom('<!DOCTYPE html>', {
  url: config.testURL,
});

@thymikee
Copy link
Collaborator

@edemaine would you like to send a PR with that fix?

@cpojer
Copy link
Member

cpojer commented Apr 28, 2017

Duplicate of #2460

@github-actions
Copy link

This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.
Please note this issue tracker is not a help forum. We recommend using StackOverflow or our discord channel for questions.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators May 13, 2021
This issue was closed.
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

3 participants