Closed peterbe closed 1 year ago
❯ uvu tests end-to-end.mjs • • • • • • • • • • • • • • • • • • • (19 / 19) Total: 19 Passed: 19 Skipped: 0 Duration: 1256.94ms
So it finds the file tests/end-to-end.mjs. Good. Within that file, there are 19 tests. One of them looks like this:
tests/end-to-end.mjs
test("home page", async () => { const response = await get("/"); assert.is(response.statusCode, 200); assert.ok(isCached(response)); assert.is(response.headers["content-encoding"], "br"); });
How do I run only that test and not the other 18?
I tried the second [pattern] argument but perhaps that's about filtering files.
[pattern]
❯ uvu tests home Total: 0 Passed: 0 Skipped: 0 Duration: 0.73ms
and
❯ uvu tests 'home page' Total: 0 Passed: 0 Skipped: 0 Duration: 0.75ms
You only to use test.only() within the test files. Doing it from the CLI is a duplicate of #74
test.only()
So it finds the file
tests/end-to-end.mjs
. Good. Within that file, there are 19 tests. One of them looks like this:How do I run only that test and not the other 18?
I tried the second
[pattern]
argument but perhaps that's about filtering files.and