Skip to content

Conversation

tolu
Copy link
Owner

@tolu tolu commented Nov 19, 2022

WONT MERGE since node:test just isn't good enough yet

closes #9

seems easy enough to move over but right not I can't find a reporter I really like and for some reason only a single test is reported, not 1 per it, which seems less detailed than I'd like it 🤷

Many TAP Reporters listed here:

TAP output from current test (to understand reporters don't have much to work with)

Actually 7 it, 2 it.todo and 3 describe

TAP version 13
# Subtest: /Users/tobias/dev/github/tolu/mkcert-cli/test/utils.test.js
ok 1 - /Users/tobias/dev/github/tolu/mkcert-cli/test/utils.test.js
  ---
  duration_ms: 770.843042
  ...
1..1
# tests 1
# pass 1
# fail 0
# cancelled 0
# skipped 0
# todo 0
# duration_ms 802.623583

Compare with vitest output from

npx vitest run --reporter tap
TAP version 13
1..1
ok 1 - test/utils.test.js # time=578.00ms {
    1..3
    ok 1 - semverGreaterThan # time=1.00ms {
        1..1
        ok 1 - returns expected bool # time=1.00ms
    }
    ok 2 - pkgJson # time=60.00ms {
        1..2
        ok 1 - matches asserted import value # time=1.00ms
        ok 2 - cli.js --version, also works from random directory # time=59.00ms
    }
    ok 3 - cli # time=517.00ms {
        1..4
        ok 1 - "--outDir, -o" sets output dir # time=461.00ms
        ok 2 - "--host" sets custom host # time=56.00ms
        ok 3 - "--keyFile, -k" sets key filename # TODO
        ok 4 - "--certFile, -c" sets cert filename # TODO
    }
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

use node:test instead of vitest
1 participant