-
Notifications
You must be signed in to change notification settings - Fork 196
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat(sdk): expect
module with assertions for testing
#3976
Conversation
An initial stab at #3918 to introduce test assertions in a testing module This renames the pre-existing `testing` module to `simulatorTesting`, but there are likely better names. Thoughts?
Console preview environment is available at https://wing-console-pr-3976.fly.dev 🚀 Last Updated (UTC) 2023-11-02 19:39 |
This reverts commit e0deac0.
Since generic function overloading is not working at the moment, I'm curious in which direction assertions should go. Thoughts? 1. Pure FunctionsAll possible matchers at the same level, no scoping.
2. Chained ObjectsType specific high level "entry point" functions (e.g.
|
Signed-off-by: monada-bot[bot] <monabot@monada.co>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is looking great.
Signed-off-by: monada-bot[bot] <monabot@monada.co>
expect
module with assertions for testing
Signed-off-by: monada-bot[bot] <monabot@monada.co>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
SHIP IT
Thanks for contributing, @skorfmann! This PR will now be added to the merge queue, or immediately merged if |
Congrats! 🚀 This was released in Wing 0.44.0. |
After some back and forth we settled on using
expect
as the module name. Mostly for the reason thatassert
is a builtin function already and would cause naming conflicts. The pull request discussions for more details.Checklist
pr/e2e-full
label if this feature requires end-to-end testingBy submitting this pull request, I confirm that my contribution is made under the terms of the Wing Cloud Contribution License.