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

[Bug]: CSSOM.parse is not exposed in the package used by jest-environment-jsdom #13315

Closed
Tirke opened this issue Sep 23, 2022 · 5 comments
Closed

Comments

@Tirke
Copy link

Tirke commented Sep 23, 2022

Version

29.0.3

Steps to reproduce

I don't have a repro currently but error is generated from @material-ui/styles since switching to jest>28 and jest-environment-jsdom.

Expected behavior

The issue is already identified https://github.com/NV/CSSOM/pull/113/files and a PR is even available but CSSOM doesn't seem to be the most maintained lib.

Actual behavior

Jest tests are generating a lot of warning in our monorepo setup

● Console

    console.warn
      Warning: [JSS] CSSOM.parse is not a function

      53 |   const registerScroll = useRegisterScrollElement()
      54 |
    > 55 |   const classes = useAppLayoutStyles({
         |                                     ^
      56 |     innerHeight,
      57 |     showNavInDesktopOnly: navType === 'desktop-only',
      58 |   })

Additional context

No response

Environment

System:
    OS: macOS 12.3
    CPU: (10) arm64 Apple M1 Pro
  Binaries:
    Node: 16.10.0 - ~/Library/Caches/fnm_multishells/1912_1663926248111/bin/node
    npm: 7.24.0 - ~/Library/Caches/fnm_multishells/1912_1663926248111/bin/npm
  npmPackages:
    jest: 29.0.3 => 29.0.3
@nickliu108
Copy link

having same issue as well

@SimenB
Copy link
Member

SimenB commented Oct 21, 2022

Sounds like an issue for JSDOM and not Jest?

@nickliu108
Copy link

Yeah, but JSDOM is not actively maintained and fixed PR not being merged: NV/CSSOM#113
A fork version with fix has been created: rrweb-io/rrweb#925
Can we use https://github.com/rrweb-io/CSSOM instead?

@SimenB
Copy link
Member

SimenB commented Oct 21, 2022

JSDOM is very much actively maintained. CSSOM is a separate project.

If you want JSDOM to use a fork, you should ask them: https://github.com/jsdom/jsdom/blob/c3c421c364510e053478520500bccafd97f5fa39/package.json#L26

@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 Nov 21, 2022
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