Closed kale-stew closed 4 years ago
Ok, replied to the above feedback and got the tests synced up with each other, but now we're seeing legitimate failures for actual test conditions.
Case 1 - compares without warning or errors: expected 0, got 1 Case 2 - elements of same type and props are equal: expected 1, got 2
Edit: It looks like our Preact check isn't passing the Preact elements we've created in these tests whatsoever, which is why it's always re-rendering. Going to evaluate the Preact elements themselves, I assume I've duplicated React behavior that is incompatible with PreactChild
and PreactContainer
.
Edit, part 2: The offending check is a.$$typeOf
which only returns React element data, it's coming back as undefined
for everything Preact. Going to tie it to the React validator for now, until I can get more feedback from more Preact-smart folks 👍
Our tests are now failing because @testing-library/dom
is incompatible with the node v8 engine that AppVeyor runs first. 😞
The library only just recently patch released support for Node v10 (one whole version newer) 13 days ago and has stated they plan to deprecate support whenever it's officially EOL (sometime mid-2021). This will be an issue for our current CI approach.
Can we skip specific tests for a specific Node version? Should we go about these tests a different way entirely? What % of users are using preact and node v<10?
@kale-stew -- I've added two small changes:
Updated cov to codecov (removed coveralls) with badge!
Also note, we're not running travis, but should pass because this branch doesn't target master. Will catch up in preact-support branch.
Description
This PR introduces tests to the Preact support that was introduced in #67.
We still need to figure out how to pass props directly to the updated Preact component being updated here to verify the container's update fn is invoked (test case no. 3)
Checklist:
Bundle size is not impacted by tests