unjs / consola

🐨 Elegant Console Logger for Node.js and Browser
Other
6k stars 175 forks source link

docs: add vitest #182

Closed atinux closed 3 months ago

atinux commented 1 year ago

Actually not 100% sure since I cannot mock right, happy to get help on this too

atinux commented 1 year ago

See on https://github.com/nuxt-modules/tailwindcss/blob/cb92551e6f1e7debb3f9f61b562edbc154f2f1f8/test/configs.test.ts#L8-L14

Failing tests: https://github.com/nuxt-modules/tailwindcss/actions/runs/4809848989/jobs/8561654002

codecov[bot] commented 1 year ago

Codecov Report

Merging #182 (a45d8e9) into main (c0ea536) will not change coverage. The diff coverage is n/a.

@@           Coverage Diff           @@
##             main     #182   +/-   ##
=======================================
  Coverage   62.35%   62.35%           
=======================================
  Files           9        9           
  Lines         781      781           
  Branches       56       56           
=======================================
  Hits          487      487           
  Misses        294      294           
pi0 commented 1 year ago

Nice. I will check it soon locally. FYI this is implementation for @nuxt/test-utils mock with vitest support:

https://github.com/nuxt/nuxt/blob/main/packages/test-utils/src/mock.ts

https://github.com/nuxt/nuxt/blob/main/packages/test-utils/src/setup/vitest.ts#L6