|
|
|
|
|
by wildpeaks
3487 days ago
|
|
Jest sounds good on paper, it's great it exists and it definitely has potential and even improved a lot recently (and I usually try every new version that come up), however I have two pain points with it that prevent me from switching to Jest for now: - it uses regexes instead of globs, so you can't just give it the list of tests like you would with Mocha or electron-mocha (e.g. something like "jest src/* * /*.tests.js") - it excludes paths that include "node_modules" and it's not just a default (which would be fine), it's hardcoded, so you can forget about local modules, or dependencies that use local modules Fortunately, there are already open issues for both, so that might improve in the future :) --- Edit: I had to add extra spaces in the glob example (so it's slightly incorrect) because HN formatting seems to prevent using "double star". |
|
FWIW, Jest is insanely good. I've been using it for almost 2 years now through some of the rougher patches in its development and man, it's an extremely well thought-out system with a team of highly motivated maintainers. Facebook uses it for almost all their JS projects, so it gets a LOT of attention and TLC.
Many things that were poor defaults have been changed since v17, like getting rid of auto mocking. It's worth a look again.