[contributing] Running only tests in specific files? Quickly identifying failing tests? #1866
Unanswered
donmccurdy
asked this question in
Q&A
Replies: 1 comment 3 replies
-
No, I usually use Open to ideas, would love to have nicer tap integration or perhaps even move to jest. |
Beta Was this translation helpful? Give feedback.
3 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
A couple questions I've run into while making PRs on this codebase. Wanted to write them down somewhere, and perhaps add them to a CONTRIBUTING.md at some point when there are answers —
Running only tests from a specific file or files
I'm aware of Tape's
test.only(...)
and use that regularly. Often though I find it helpful to run all tests from a specific file, or files. In plain Tape I would write...... or something a little more elaborate, if using ts-node or tsx for TypeScript execution. Is there an equivalent way to do this with Ocular Dev Tools?
Identifying failing test(s)
When running
yarn test
I see a lot of unformatted tap output, in which it can be difficult to spot the failing tests, or the failing tests can overflow the terminal's scrollback buffer. I can use a formatter to make that more readable...... but this only works when running tests in Node.js. When testing in a browser the unformatted tap output goes to the browser's console, which may also overflow the scrollback buffer, so I can't see which test is failing in the browser. Is there a way to narrow test failures down, or see a summary of the failing tests?
Beta Was this translation helpful? Give feedback.
All reactions