8000 chore: upgrade to vitest 1.0 by benmccann · Pull Request #141 · thecodrr/fdir · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

chore: upgrade to vitest 1.0 #141

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

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open

Conversation

benmccann
Copy link
Contributor
@benmccann benmccann commented Apr 18, 2025

I'm not sure why it thinks coverage dropped so much. I'd be surprised if we were really at 100% before. I trust it more with this PR

@thecodrr
Copy link
Owner

This is what I am seeing:

> vitest run --coverage __tests__/

The CJS build of Vite's Node API is deprecated. See https://vite.dev/guide/troubleshooting.html#vite-cjs-node-api-deprecated for more details.

 RUN  v1.6.1 /Users/thecodrr/Sources/Repos/fdir
      Coverage enabled with v8

 ✓ __tests__/symlinks.test.ts (26)
 ✓ __tests__/fdir.test.ts (77) 412ms

 Test Files  2 passed (2)
      Tests  103 passed (103)
   Start at  09:42:36
   Duration  568ms (transform 68ms, setup 0ms, collect 118ms, tests 490ms, environment 0ms, prepare 58ms)

 % Coverage report from v8
---------------------|---------|----------|---------|---------|-------------------
File                 | % Stmts | % Branch | % Funcs | % Lines | Uncovered Line #s
---------------------|---------|----------|---------|---------|-------------------
All files            |    73.3 |    96.86 |   95.74 |    73.3 |
 benchmarks          |       0 |        0 |       0 |       0 |
  benchmark.js       |       0 |        0 |       0 |       0 | 1-157
  export.ts          |       0 |        0 |       0 |       0 | 1-30
  fdir-benchmark.ts  |       0 |        0 |       0 |       0 | 1-126
  glob-benchmark.ts  |       0 |        0 |       0 |       0 | 1-49
 src                 |     100 |    93.33 |     100 |     100 |
  index.ts           |     100 |      100 |     100 |     100 |
  types.ts           |     100 |      100 |     100 |     100 |
  utils.ts           |     100 |    93.33 |     100 |     100 | 34
 src/api             |     100 |      100 |     100 |     100 |
  async.ts           |     100 |      100 |     100 |     100 |
  counter.ts         |     100 |      100 |     100 |     100 |
  queue.ts           |     100 |      100 |     100 |     100 |
  sync.ts            |     100 |      100 |     100 |     100 |
  walker.ts          |     100 |      100 |     100 |     100 |
 src/api/functions   |     100 |    97.93 |     100 |     100 |
  get-array.ts       |     100 |      100 |     100 |     100 |
  group-files.ts     |     100 |      100 |     100 |     100 |
  invoke-callback.ts |     100 |      100 |     100 |     100 |
  join-path.ts       |     100 |      100 |     100 |     100 |
  push-directory.ts  |     100 |      100 |     100 |     100 |
  push-file.ts       |     100 |      100 |     100 |     100 |
  resolve-symlink.ts |     100 |    91.42 |     100 |     100 | 23,26,56
  walk-directory.ts  |     100 |      100 |     100 |     100 |
 src/builder         |     100 |      100 |     100 |     100 |
  api-builder.ts     |     100 |      100 |     100 |     100 |
  index.ts           |     100 |      100 |     100 |     100 |
---------------------|---------|----------|---------|---------|-------------------

The benchmarks directory should probably not be included.

@@ -11,7 +11,7 @@ jobs:

strategy:
matrix:
node-version: [16.x, 18.x, 20.x]
node-version: [18.x, 20.x, 22.x]
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Vitest 1.0 depends on Vite 5, which does not run on Node 16

Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I am not sure if dropping support (essentially) for Node v16 is a good idea. The current version of Vitest works and there's really no need to upgrade.

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 thes 36CE e issues.

2 participants
0