Comments (4)
@1cg was thinking jest, will have to go take a look at mocha-chrome. Thanks!
from m-.
htmx uses sinon and mocha/chai:
https://github.com/bigskysoftware/htmx/tree/master/test
And then mocha-chome for headless testing:
not sure sinon is as useful for you, since htmx has to mock out AJAX
from m-.
👋🏻 I highly suggest using Cypress Component Testing. I'm the maintainer and I'm happy to help you out. Right now we have framework-specific bindings, but writing a wrapper for vanilla JS is about ~120 lines by leveraging @cypress/mount-utils
.
Happy to publish it under Cypress's official namespace if you'd like to send me a PR or an isolated repository.
Cypress CT is a great solution for your a11y-focused library because we actually test in the web, and we have a lot of support for detecting if things are rendered vs visually hidden or clickable. There are things you simply cannot test with jest, etc.
Technically, you could think of it as "Mocha + Chrome", but with a driver that mimics usage more realistically than a programmatic .trigger('click')
is able to do. Happy to chat in Discord.
from m-.
@JessicaSachs thanks for the suggestion. I like Cypress for e2e. I'll have to check out the ct stuff.
from m-.
Related Issues (20)
- Fix table collapse on small screens HOT 1
- Icons not displaying in docs HOT 1
- m-docs.org is broken HOT 7
- Link button siblings missing margin
- Docs website issues for colourblind users HOT 3
- https://unpkg.com/[email protected]/dist/dev.css not found HOT 2
- Question: How should I override the values of the tokens inside custom-props.css ? HOT 1
- How do you set up a dark mode with the lib? HOT 3
- Publish custom-elements.json manifest
- Switch component
- Focus indicator on summary details page (accordion) HOT 1
- [Question] Does m- work well with tailwind css for e.g.? HOT 1
- Broken example on Autocomple demo page in Firefox. HOT 2
- The connectedCallback runs multiple times HOT 2
- Adding charts/graphs HOT 2
- Border width docs contain inaccuracy HOT 1
- Tailwind Comparision HOT 2
- Broken link to "TAC Methodology"? HOT 1
- Docs site SSL certificate expired HOT 4
- Button focus styles HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from m-.