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

Make the --watch flag work again #2504

Merged
merged 3 commits into from Mar 26, 2023
Merged

Make the --watch flag work again #2504

merged 3 commits into from Mar 26, 2023

Conversation

fatso83
Copy link
Contributor

@fatso83 fatso83 commented Mar 24, 2023

Purpose (TL;DR) - mandatory

We currently cannot use the --watch flag to Mocha as we tamper with the Function protype and keep state in the assertion tests. This PR should fix that

How to verify - mandatory

  1. npx mocha --watch
  2. Touch some file to trigger re-run
  3. See all pass

Checklist for author

  • npm run lint passes
  • References to standard library functions are cached.

@fatso83 fatso83 marked this pull request as draft March 24, 2023 17:32
@codecov
Copy link

codecov bot commented Mar 24, 2023

Codecov Report

Patch coverage: 100.00% and no project coverage change.

Comparison is base (477064b) 95.99% compared to head (3b4e6d2) 95.99%.

❗ Current head 3b4e6d2 differs from pull request most recent head e3c4bbc. Consider uploading reports for the commit e3c4bbc to get more accurate results

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #2504   +/-   ##
=======================================
  Coverage   95.99%   95.99%           
=======================================
  Files          40       40           
  Lines        1897     1898    +1     
=======================================
+ Hits         1821     1822    +1     
  Misses         76       76           
Flag Coverage Δ
unit 95.99% <100.00%> (+<0.01%) ⬆️

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

Impacted Files Coverage Δ
lib/sinon/spy-formatters.js 98.52% <100.00%> (+0.02%) ⬆️

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

☔ View full report in Codecov by Sentry.
📢 Do you have feedback about the report comment? Let us know in this issue.

This made 3 of the assertion tests fail when re-running
as Sinon's spy formatter changed the exports of the
samsam module
Ensure we cannot do the same mistake again
@fatso83 fatso83 changed the title (WIP) Make the --watch flag work again Make the --watch flag work again Mar 26, 2023
@fatso83 fatso83 marked this pull request as ready for review March 26, 2023 12:55
@fatso83 fatso83 merged commit b775f1b into main Mar 26, 2023
8 checks passed
@fatso83 fatso83 deleted the issue-2502 branch March 26, 2023 12:59
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.

None yet

1 participant