-
Notifications
You must be signed in to change notification settings - Fork 9
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
bind additional Assert functions #29
base: main
Are you sure you want to change the base?
bind additional Assert functions #29
Conversation
illusionalsagacity
commented
Jan 22, 2025
- notEqual
- notDeepEqual
- strictEqual
- notStrictEqual
- deepStrictEqual
- fail
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.
Nitpicking, but can you replace it with t->expect
style?
Maybe I should change the binding to t => x => expected
instead of (t, x) => expected
later version 🤔
- notEqual - notDeepEqual - strictEqual - notStrictEqual - deepStrictEqual - fail
e69036e
to
adfddaa
Compare
Hmm, I kinda like that, you could alias expect in the start of your test function more easily that way too: test("blah", t => {
let expect = expect(t)
...
}) |
@cometkim any others you think would be useful? I think these would be the most common for use in let a = ref(0)
let b = ref(0.)
await waitFor(() => {
Assert.Int.isAbove(a.contents, 0, ~message="a is 0")
})
await waitFor(() => {
Assert.Float.isAbove(b.contents, 0., ~message="b is 0.")
}) |
Well, I'm not a fan of exposing a bloated API surface upfront by providing bindings. Some should strictly follow the binding style, but users should easily add or extend simple helper methods themselves. Most submodules of |
Are there any functions in here you would prefer not to be merged? Regardless I will leave out any more, to your point they should be straightforward enough to bind in consumer's projects |
If you use it in your project and you want to upstream it. I will merge unless there is a style conflict. Otherwise we can open issue and discuss first |