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

cleanup:test: rewrite jest mocks to use jest.mocked #2560

Merged
merged 5 commits into from
Apr 26, 2024

Conversation

firestack
Copy link
Member

There's more to do, but as an incremental fix, I think this is good enough for 15m of time.

I ran these commands, and then reverted tests that started failing.

, ast-grep run -p '($V as jest.Mock)' -r 'jest.mocked($V)' ./assets/ -U

, ast-grep run -p '($V as jest.Mock<$_>)' -r 'jest.mocked($V)' ./assets/ -i

```
, ast-grep run -p '($V as jest.Mock)' -r 'jest.mocked($V)' ./assets/ -U
```
```
, ast-grep run -p '($V as jest.Mock<$_>)' -r 'jest.mocked($V)' ./assets/ -i
```
@firestack firestack self-assigned this Apr 26, 2024
@firestack firestack requested a review from a team as a code owner April 26, 2024 17:46
Copy link

Coverage of commit 75c9e70

Summary coverage rate:
  lines......: 93.8% (3220 of 3433 lines)
  functions..: 73.4% (1333 of 1816 functions)
  branches...: no data found

Files changed coverage rate: n/a

Download coverage report

Copy link
Contributor

@joshlarson joshlarson left a comment

Choose a reason for hiding this comment

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

I basically just looked through to see if I could find any obvious mistakes, which I couldn't, and also the builds pass.

Thanks for doing this!

@firestack firestack merged commit 8503517 into main Apr 26, 2024
6 checks passed
@firestack firestack deleted the kf/cleanup/jest-mocked branch April 26, 2024 19:40
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.

2 participants