-
Notifications
You must be signed in to change notification settings - Fork 654
Open
Labels
PR welcomeA pull request for this issue would be welcomeA pull request for this issue would be welcomeenhancementNew feature or requestNew feature or requestexpectgood first issueGood for newcomersGood for newcomers
Description
The following APIs are currently not yet implemented in std/expect
:
toMatchSnapShot
toMatchInlineSnapShot
toThrowErrorMatchingSnapShot
toThrowErrorMatchingInlineSnapShot
expect.anything
feat(expect): add asymmetric matchers (#3964) #4366expect.arrayContaining
feat(expect): add asymmetric matchers (#3964) #4366expect.not.arrayContaining
fix(expect): support expect.not.{arrayContaining,objectContaning,stringContaining,stringMatching} #6138expect.objectContaining
fix(expect): supportexpect.objectContaining
#6065expect.not.objectContaining
fix(expect): support expect.not.{arrayContaining,objectContaning,stringContaining,stringMatching} #6138expect.stringContaining
feat(expect): addexpect.{closeTo, stringContaining, stringMatching}
#4508expect.not.stringContaining
fix(expect): support expect.not.{arrayContaining,objectContaning,stringContaining,stringMatching} #6138expect.stringMatching
feat(expect): addexpect.{closeTo, stringContaining, stringMatching}
#4508expect.not.stringMatching
fix(expect): support expect.not.{arrayContaining,objectContaning,stringContaining,stringMatching} #6138expect.assertions
fix(expect,internal,testing): supportexpect.assertions
#6032expect.hasAssertions
fix(expect): supportexpect.hasAssertions()
#5901expect.addEqualityTester
feat(expect): addexpect.addEqualityTesters
api. #4255expect.addSnapshotSerializer
feat(expect): supportexpect.addSnapshotSerialize()
api #4537expect.extend
feat(expect): supportexpect.extend()
api #4412To pick up a draggable item, press the space bar. While dragging, use the arrow keys to move the item. Press space again to drop the item in its new position, or press escape to cancel.
For those wanting to contribute, please submit one PR per API.
dandv
Metadata
Metadata
Assignees
Labels
PR welcomeA pull request for this issue would be welcomeA pull request for this issue would be welcomeenhancementNew feature or requestNew feature or requestexpectgood first issueGood for newcomersGood for newcomers
Type
Projects
Milestone
Relationships
Development
Select code repository
Activity
[-]tracking: complete `std/expct`[/-][+]tracking: complete `std/expect`[/+]raashidanwar commentedon Dec 18, 2023
Hey @iuioiua,
I would love to contribute here.
iuioiua commentedon Dec 18, 2023
Great! Let us know which ones you'd like to work on, so there's no overlap with other's work.
syhol commentedon Dec 18, 2023
As you start working on the async matchers, you might end up fixing #3947 as a side effect.
raashidanwar commentedon Jan 1, 2024
@iuioiua I will be picking.
eryue0220 commentedon Jan 24, 2024
Hi @iuioiua @raashidanwar
Can I try for this too?
I'll pick
iuioiua commentedon Jan 24, 2024
For sure! Thank you. Please let us know if you need any help with anything.
eryue0220 commentedon Jan 25, 2024
Hi, @iuioiua
I have a question about is there a way that I can know whether the current
Deno.test
is completed or not?iuioiua commentedon Jan 28, 2024
Can you elaborate? Perhaps, something like this is what you're after.
16 remaining items
kt3k commentedon Mar 16, 2024
Yes, it corresponds to
jest.fn
https://jestjs.io/docs/mock-functionsexpect.{closeTo, stringContaining, stringMatching}
#4508expect.addSnapshotSerialize()
api #4537expect.hasAssertions()
#5901expect.assertions
#6032finleyjb commentedon Sep 26, 2024
I'm considering implementing
objectContaining
. Is anyone working on this?eryue0220 commentedon Sep 26, 2024
Yes, I'm doing this now. You could try other API.
expect.objectContaining
#6065rperryng commentedon Oct 24, 2024
on that note, are there plans to improve the type-safety around
fn()
to match the type-safety ofjest.fn()
?Since
fn()
currently is typed asFunction
, it returnsany
(which the typescript docs mention as a reason to avoid its usage).(I hope this is the right place for this conversation, I couldn't find any other open issues that cover this topic yet)
expect.addSnapshotSerializer
#6173no-expect-assertions-call-in-deno-test
denoland/deno_lint#1339WWRS commentedon Mar 31, 2025
I can implement
toMatchSnapshot
andtoThrowErrorMatchingSnapshot
, but I want to see if dependencies change in #6541 before starting.Same for
toMatchInlineSnapshot
andtoThrowErrorMatchingInlineSnapshot
, but I am also waiting on #6530.assertInlineSnapshot()
#6530