-
Notifications
You must be signed in to change notification settings - Fork 7
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
Testing: recommend “testharness.js” instead of “mocha”? #4
Comments
JestAFAIKT, web-platform testing isn't aiming for general use while Jest is. Here's my experience with using Jest on a couple projects:
I've not used Jest in the browser (supposed to be good with Angular). Hopefully, this will save some folks some aggravation. |
Thank you, @ericprud, for contributing — and for doing so with concrete ideas and details! I haven't used Jest, but I know it's an alternative that's popular with the community. So I'm not opposed in principle. Let's see what others have to say… Broader question: how to decide when it's time we recommend (or at least we “accept”) a new package? I'd say we can consider alternatives or additions when there is at least one W3C project using it, and its maintainers have that experience and can defend its usage with specific arguments. I see there is not one public W3C project using Jest yet. I'll be happy for a dissenter to break with the orthodoxy and adopt it themselves on a public W3C software project, then report back here on advantages (as @ericprud did). |
Note that Jest cannot run in a real browser (yet: jestjs/jest#848), it runs "browser tests" in JSDOM. You can use its assertions standalone though, instead of e.g. chai in mocha: https://www.npmjs.com/package/expect. Those support the browser |
In jsdom with nodes earlier than 8(?), you can't let element names collide with function names, c.f. jsdom/jsdom#2259 . What's the typical workflow for such in-browser tests, does it use headless-browser? (I've only managed to automate browser tests using jsdom so far.) |
As I wrote on the document, imho
testharness.js
needs at the very least to be a project maintained independently, and a package available vianpm
. Then, we will need good reasons to abandon the very popularmocha
in favour of this other (less powerful?) tool.ping @plehegar
The text was updated successfully, but these errors were encountered: