-
Notifications
You must be signed in to change notification settings - Fork 20
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Refactor assertions to use testResult
- Loading branch information
Sarah Hamilton
committed
Jul 26, 2021
1 parent
a69a1f2
commit c6690b8
Showing
3 changed files
with
23 additions
and
39 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1,13 @@ | ||
import { testResult } from "../../utils/testResult"; | ||
|
||
export default { | ||
toHaveEvent(eventBridgeEvents) { | ||
let message; | ||
if (eventBridgeEvents) { | ||
return { | ||
message: () => "expected to have message in EventBridge Bus", | ||
pass: true, | ||
}; | ||
message = "expected to have message in EventBridge Bus"; | ||
return testResult(message, true); | ||
} | ||
return { | ||
message: () => "no message intercepted from EventBridge Bus", | ||
pass: false, | ||
}; | ||
message = "no message intercepted from EventBridge Bus"; | ||
return testResult(message, false); | ||
}, | ||
}; |
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