Add expects: fail and ok#10
Merged
kobenguyent merged 5 commits intocodeceptjs:mainfrom Apr 30, 2026
Merged
Conversation
Contributor
Author
|
@thomashohn could you run a workflow and make an review, please? |
thomashohn
approved these changes
Apr 29, 2026
Contributor
Author
|
@thomashohn Can you also merge this PR, please? cuz i don't have an active merge button in UI |
Contributor
|
@kobenguyent - can you review this one - I can merge it at create an release if it's ok |
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds two new assertion wrappers to
ExpectHelper:I.expectFail()to explicitly fail a test with an optional custom messageI.expectOk()to assert that a value is truthyChanges
Implemented
expectFail(customErrorMsg = 'expect fail')Implemented
expectOk(actualValue, customErrorMsg = '')Added TypeScript definitions for both methods
Added README documentation with examples
Added unit tests covering:
Testing
Added tests in
index_test.jsfor both new wrappers.