You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When running a test that's expected to fail using expectFailureOn() the test passes even if the expected error message doesn't match the actual error message from the test run
Version(s) affected
To Reproduce
Add a test you expect to fail, or modify one of the existing ones making the I18nMessage sent as argument in expectFailureOn() be any random string.
Run the test and verify that the test passes
Expected behavior
The message from the assertion failure should match the one expected in the test file. If they don't match the test should not pass
The text was updated successfully, but these errors were encountered:
I found the problem. For default equality assertions, we were relying on Node's assert#deepStrictEqual function. This functions compares objects by enumerating their properties. Properties must be enumerable.
When I introduced private fields as a "refactor", I broke the equality for these objects, because private properties are not enumerable, therefore the equality always returned true (no enumerable properties to compare).
I will work on the issue and release a new version with the fix.
Describe the bug
When running a test that's expected to fail using
expectFailureOn()
the test passes even if the expected error message doesn't match the actual error message from the test runVersion(s) affected
To Reproduce
expectFailureOn()
be any random string.Expected behavior
The message from the assertion failure should match the one expected in the test file. If they don't match the test should not pass
The text was updated successfully, but these errors were encountered: