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: Fix issue with jest projects matching ui/node_modules #20601

Merged
merged 1 commit into from
Jan 13, 2023

Conversation

tmeasday
Copy link
Member

@tmeasday tmeasday commented Jan 13, 2023

Issue:

(1) sometimes tests come up twice, both within a project and at the root. They fail in the latter with babel problems

Also there are a bunch of warnings like:

● Validation Warning:

  Unknown option "projects" with value ["<rootDir>/addons/*", "<rootDir>/frameworks/!(angular)*", "<rootDir>/lib/*", "<rootDir>/renderers/*", "<rootDir>/ui/*"] was found.
  This is probably a typing mistake. Fixing it will remove this message.

  Configuration Documentation:
  https://jestjs.io/docs/configuration

(2) sometimes jest fails completely complaining about duplicate project paths.

The issue comes from the projects field matching folders with no jest.config.js. I've seen two so far:

  • code/ui/node_modules - there's a .cache in there from running our internal SB.
  • addons/storyshots - this was recently renamed and sometimes gets left hanging out by git when you switch branches.

What I did

Ignored the first folder with a glob.

I assume the second problem will go away by itself, I mention it here just in case anyone gets the same issue, so they know to just delete it.

How to test

Run yarn test

@tmeasday tmeasday added the maintenance User-facing maintenance tasks label Jan 13, 2023
@tmeasday tmeasday requested a review from IanVS January 13, 2023 00:56
Copy link
Member

@IanVS IanVS left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Seems reasonable to me.

@tmeasday tmeasday merged commit 8b25057 into next Jan 13, 2023
@tmeasday tmeasday deleted the fix-jest-duplication branch January 13, 2023 04:11
@shilman shilman added build Internal-facing build tooling & test updates and removed maintenance User-facing maintenance tasks labels Jan 13, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
build Internal-facing build tooling & test updates
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants