Skip to content

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
Collaborator

@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
@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