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

build: ignore node_modules and build outputs when watching for changes during stencil tests #7209

Merged
merged 2 commits into from
Jun 22, 2023

Conversation

benelan
Copy link
Member

@benelan benelan commented Jun 22, 2023

Summary

Currently our npm run test:watch script watches files in node_modules, dist, and other build outputs, which doesn't make sense unless you're monkey patching stuff. I've been getting an error due to watching too many files since we transitioned to a monorepo:

[ ERROR ]  runJest: Error: EMFILE: too many open files, watch
          '/app/packages/calcite-components'

npm ERR! Lifecycle script `test` failed with error:
npm ERR! Error: command failed
npm ERR!   in workspace: @esri/calcite-components@1.5.0-next.4
npm ERR!   at location: /app/packages/calcite-components

Ignoring node_modules and the build outputs resolved the issue for me (ref: jestjs/jest#8088 (comment)).

If anyone still experiences this error, installing watchman is another option (ref: jestjs/jest#3436 (comment)).

Jest uses watchman by default if it is installed.

@benelan benelan requested a review from a team as a code owner June 22, 2023 00:26
@github-actions github-actions bot added the chore Issues with changes that don't modify src or test files. label Jun 22, 2023
@benelan benelan changed the title build: ignore watching output files for stencil tests build: ignore node_modules and build outputs when watching for changes during stencil tests Jun 22, 2023
Copy link
Member

@jcfranco jcfranco left a comment

Choose a reason for hiding this comment

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

Stencil watching all the files 👁️👄👁️

Great catch!

@benelan benelan added the skip visual snapshots Pull requests that do not need visual regression testing. label Jun 22, 2023
@benelan benelan merged commit 52fdd43 into master Jun 22, 2023
@benelan benelan deleted the benelan/test-watch-ignore-paths branch June 22, 2023 19:18
@github-actions github-actions bot added this to the 2023 June patch priorities milestone Jun 22, 2023
benelan added a commit that referenced this pull request Jun 26, 2023
…nches--master

* origin/master:
  build(t9n): generate json file containing t9n values (#7214)
  chore: release next
  fix(combobox, dropdown, input-date-picker, input-time-picker, popover, tooltip): Prevent repositioning from affecting other floating components (#7178)
  build: update browserslist db (#7192)
  build: ignore node_modules and build outputs when watching for changes during stencil tests (#7209)
benelan added a commit that referenced this pull request Jun 27, 2023
…issue-template-checkbox

* origin/master: (32 commits)
  ci: double build cc when publishing to workaround stencil types bug (#7227)
  build: bump package versions back to 1.5.0-next.5 (#7228)
  chore: release latest (#7144)
  ci: hardcode release version due to reverting feat (#7225)
  fix(tree-item): ensure expanded tree-item is displayed when expanded and made visible (#7216)
  ci(release-please): pin action version and allow manually running action (#7222)
  fix(input, input-number): allows numeric characters. (#7213)
  build(t9n): generate json file containing t9n values (#7214)
  chore: release next
  fix(combobox, dropdown, input-date-picker, input-time-picker, popover, tooltip): Prevent repositioning from affecting other floating components (#7178)
  build: update browserslist db (#7192)
  build: ignore node_modules and build outputs when watching for changes during stencil tests (#7209)
  test: set up `disabled` helper to run a test per use case (#7089)
  ci: set design complete label conditionals (#7206)
  chore: release next
  fix(list): update selectedItems property on all item selection changes (#7204)
  chore: fix sorting logic for t9nmanifest entries (#7203)
  fix(radio-button):  focuses first focusable radio-button element in group. (#7152)
  chore: release next
  fix(alert): update alert queue when an alert is removed from the DOM (#7189)
  ...
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
chore Issues with changes that don't modify src or test files. skip visual snapshots Pull requests that do not need visual regression testing.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants