Skip to content

Conversation

@KristjanESPERANTO
Copy link
Collaborator

Jest was in the plugin array of the ESLint configuration, but no rules were enabled. So ESLint hasn't checked any Jest rules yet.

So I activated the recommended Jest rules and added a few more. Then I fixed the issues (mostly automatically). I have deactivated the rules "jest/expect-expect" and "jest/no-done-callback" for the time being, as they would have entailed major changes. I didn't want to make the PR too big.

I'm not a Jest expert, but the changes so far look good to me. What do you think of that @khassel? 🙂

@KristjanESPERANTO KristjanESPERANTO marked this pull request as ready for review November 20, 2023 18:48
@khassel
Copy link
Collaborator

khassel commented Nov 20, 2023

Thanks, LGTM!

Will merge it if @rejas has no complaints ...

@rejas
Copy link
Collaborator

rejas commented Nov 20, 2023

No complaints

@khassel khassel merged commit 7098f1e into MagicMirrorOrg:develop Nov 20, 2023
@KristjanESPERANTO KristjanESPERANTO deleted the eslintjest branch November 20, 2023 19:12
@KristjanESPERANTO
Copy link
Collaborator Author

If anyone wants to take a look. I've been working on enabling the "jest/expect-expect" and "jest/no-done-callback" rules for a while now and adapting the code accordingly. I haven't come to an acceptable result and am putting it aside.

@khassel
Copy link
Collaborator

khassel commented Nov 20, 2023

is your work here?

@KristjanESPERANTO
Copy link
Collaborator Author

Ah, that's an attempt that I wasn't happy with either. If you want to investigate this, it might be better to ignore that attempt and change the rules yourself from "off" to "warn" and look at the issues from npm run test:js.

@KristjanESPERANTO
Copy link
Collaborator Author

In any case, I think it's worth taking a look especially at rule "jest/no-done-callback", because its implementation might help us to avoid problems that we sometimes have with asynchronous code.

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