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

chore(monorepo): run jest on all frontend projects by default #13834

Merged
merged 1 commit into from
Oct 24, 2023

Conversation

shlokamin
Copy link
Member

@shlokamin shlokamin commented Oct 24, 2023

Overview

So it turns out that jest's watch cli flag only works as expected (only rereuns tests that your code change affects using a dependency graph) if you don't provide specific test file paths.

i.e. yarn jest --watch will only run tests that your src code change affects, while yarn jest step-generation --watch will rerun ALL step generation tests when a file change is made even if the file you modified is inside of the app directory.

To fix this, rather than providing paths to all JS projects by default, we run yarn on everything unless file paths are provided.

Good catch, @brenthagen!

Risk assessment

Low

@shlokamin shlokamin requested a review from a team as a code owner October 24, 2023 18:33
@codecov
Copy link

codecov bot commented Oct 24, 2023

Codecov Report

Merging #13834 (c8479ff) into edge (32dd347) will increase coverage by 0.00%.
The diff coverage is n/a.

Additional details and impacted files

Impacted file tree graph

@@           Coverage Diff           @@
##             edge   #13834   +/-   ##
=======================================
  Coverage   70.76%   70.76%           
=======================================
  Files        2485     2485           
  Lines       69807    69807           
  Branches     8471     8471           
=======================================
+ Hits        49396    49401    +5     
+ Misses      18413    18408    -5     
  Partials     1998     1998           
Flag Coverage Δ
app 68.24% <ø> (ø)
components 63.01% <ø> (ø)
g-code-testing 96.44% <ø> (ø)
hardware 56.69% <ø> (+0.05%) ⬆️
hardware-testing ∅ <ø> (∅)
notify-server 89.13% <ø> (ø)
shared-data 74.00% <ø> (ø)
system-server 96.02% <ø> (ø)
update-server 63.51% <ø> (ø)
usb-bridge 76.81% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

see 2 files with indirect coverage changes

Copy link
Member

@sfoster1 sfoster1 left a comment

Choose a reason for hiding this comment

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

ah, nice!

@shlokamin shlokamin merged commit f67a9f6 into edge Oct 24, 2023
65 checks passed
@shlokamin shlokamin deleted the chore_run-tests-on-all-packages-by-default branch October 24, 2023 19:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants