enable eslint jest/expect-expect and jest/no-done-callback#3272
enable eslint jest/expect-expect and jest/no-done-callback#3272rejas merged 1 commit intoMagicMirrorOrg:developfrom
Conversation
|
@KristjanESPERANTO may you can take a look at this (could not add you as reviewer, the list contains only collaborators) |
There was a problem hiding this comment.
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: 1After:
● 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"}]
I think that is not possible in this case. The solution with the So I think this can be merged, if someone finds a better solution he can provide a new PR ... |
follow up to #3270