-
Notifications
You must be signed in to change notification settings - Fork 435
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Wrap
noNext
-prefixed test helpers in assertions (#805)
This is an entirely test-suite focused changeset. The `noNextEventNamed, `noNextEventOnTarget`, and `noNextAttributeMutationNamed` test utility functions are named similarly to `nextEventNamed`, `nextEventOnTarget`, and `nextAttributeMutationNamed` helpers, but their behavior has one major subtle difference: they need to be wrapped in an assertion to fail. For example, if a `noNextEventNamed(page, "turbo:load")` is invoked and there **is not** a `turbo:load` event to be read from the logs, the tests will wait indefinitely (until they time out). A timeout signals a failure, and the suite will fail. In the case of the `noNext`-prefixed versions, the absence of an entry in the logs will return `false` immediately. If the calling test does not make an assertion about the return value, it will continue along despite the false negative. This commit finds all invocations of `noNext`-prefixed helpers, and wraps them in `assert.ok` calls. It's a short term fix, but shipping a fix like this immediately will reduce the possibilities of introducing any false negatives into the suite.
- Loading branch information
1 parent
0f3632a
commit 055c3a7
Showing
5 changed files
with
33 additions
and
18 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters