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

enable eslint jest/expect-expect and jest/no-done-callback #3272

Merged
merged 1 commit into from
Nov 22, 2023

Conversation

khassel
Copy link
Collaborator

@khassel khassel commented Nov 21, 2023

follow up to #3270

@khassel khassel requested a review from rejas November 21, 2023 23:28
@khassel
Copy link
Collaborator Author

khassel commented Nov 21, 2023

@KristjanESPERANTO may you can take a look at this (could not add you as reviewer, the list contains only collaborators)

Copy link
Contributor

@KristjanESPERANTO KristjanESPERANTO left a comment

Choose a reason for hiding this comment

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

Looks good! 👍

I was hoping that there was a solution to eliminate the wrapping promise 😅 Like making the anonymous function async - like this: 9102bd3. But it doesn't work.

Your approach works and I don't have a better one, so I give my go for merging.

BTW: I have already seen a little benefit from the latest adjustments. Seeing the contents of the array is certainly sometimes helpful when troubleshooting:

Before:

  ● Calendar fetcher utils test › filterEvents › no events, not crash

    expect(received).toEqual(expected) // deep equality

    Expected: 0
    Received: 1

After:

  ● Calendar fetcher utils test › filterEvents › no events, not crash

    expect(received).toHaveLength(expected)

    Expected length: 0
    Received length: 1
    Received array:  [{"class": undefined, "description": false, "endDate": "1700617686290", "fullDayEvent": false, "geo": false, "location": false, "startDate": "1700610486288", "title": "ongoingEvent"}]

@khassel
Copy link
Collaborator Author

khassel commented Nov 22, 2023

I was hoping that there was a solution to eliminate the wrapping promise 😅 Like making the anonymous function async - like this: 9102bd3. But it doesn't work.

I think that is not possible in this case. The solution with the Promise inside the test was recommended here

So I think this can be merged, if someone finds a better solution he can provide a new PR ...

@rejas rejas merged commit 6ffdc7b into MagicMirrorOrg:develop Nov 22, 2023
5 checks passed
@khassel khassel deleted the eslint branch November 25, 2023 23:30
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