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

🐛 Data-grid-react: fix test setup #3169

Closed
oddvernes opened this issue Nov 30, 2023 · 0 comments · Fixed by #3162
Closed

🐛 Data-grid-react: fix test setup #3169

oddvernes opened this issue Nov 30, 2023 · 0 comments · Fixed by #3162
Assignees
Labels
🐛 bug Something isn't working data-grid

Comments

@oddvernes
Copy link
Collaborator

Ever since data-grid-react was added, the pnpm test:data-grid-react command have in fact been pointing to the eds-core-react tests in the root package.json. Thus, the data-grid tests never ran on github-actions this whole time 😂 👍.
Turns out there is a problem with the tests as babel-plugin-styled-components is unable to resolve eds-core-react commonjs file.
It is a bit unclear to me if this plugin is even supposed to read this file?? (it is already parsed and transpiled by the same plugin in its own build step) So perhaps the solution lies in jest.config.ts. Hopefully it is not something wrong with the core-react build. Of course due to the lack of test being ran, it is unclear when this problem started in the first place, but most likely when we upgraded to styled-components v6, or after the major dependency update last release.

Anyway the specific problem causing test to crash lies in babel-plugin-styled-components/lib/utils/detectors.js from line 123 where tag.object is undefined, and could be fixed by adding null-checks here, but as I said I'm not sure the plugin is supposed to read this file 🤷‍♂

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🐛 bug Something isn't working data-grid
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant