Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Integration with cypress#445

Unanswered
mammadataei asked this question inQ&A
Mar 10, 2022· 1 comments· 18 replies
Discussion options

Hi, Does anyone have a solution to integratejest-dom with cypress? or any alternative? I need some of the assertions liketoHaveAccessibleDescription,toHaveAccessibleName andtoHaveErrorMessage which are not available in cypress orchai-dom.

You must be logged in to vote

Replies: 1 comment 18 replies

Comment options

I'd love to have something like that.

It'd be great if we could export lower level functions that implement the logic of the checks that each assertion does. Then another library (perhaps a @testing-library/cypress-dom` library) could then implement Cypress-centric chai-like assertions while re-using the same implementation.

You must be logged in to vote
18 replies
@mammadataei
Comment options

Good. just one more thing to ask. Does the project's setup or toolchain matter? Or Are there any conventions I have to follow?

@gnapse
Comment options

Thanks,@eps1lon for that reply. Indeed, that's a very good approach.

Does the project's setup or toolchain matter? Or Are there any conventions I have to follow?

It'd be good if you base your initial repo structure off of copying the way jest-dom is set up. In particular, the way the package json scripts section works, which is mostly based on kcd-scripts, and how it does versioning. This will allow the automated semantic versioning to work, and make it easier to automate releases on PR merges.

@mammadataei
Comment options

Okay, I'll try to set up the structure and the scripts as is injest-dom, but do you mind if I usetypescript,vitest, and probablypnpm (for better developer experience)?

@gnapse
Comment options

About TypeScript, definitely.

About vitest and pnpm, I have never used them, so I may be negatively biased here, but I would not want this package to divert too much from the developer experience in all the other packages in testing-library. It is my understanding that we mostly use jest and npm. But feel free to make your case here if you feel strongly about it. Or let's see what others think.

@mammadataei
Comment options

@gnapse@eps1lon@kentcdodds

Hey again, It's been quite a while 😁, and eventually, I got some time and wrote a couple of assertions. Here's therepo. There ain't much but I think it's enough for an alpha release to test if the API integrates properly withjest-dom. At the same time, I can continue adding more assertions and startcypress-dom as well.

Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment
Category
Q&A
Labels
None yet
5 participants
@mammadataei@gnapse@kentcdodds@alexkrolick@eps1lon

[8]ページ先頭

©2009-2025 Movatter.jp