Skip to content
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

feat: add vitest #642

Closed
wants to merge 14 commits into from
Closed

feat: add vitest #642

wants to merge 14 commits into from

Conversation

xiaohuoni
Copy link
Member

@xiaohuoni xiaohuoni commented Apr 28, 2023

使用 vitest 执行测试。

主要修改点

resolve.sync('../preset', {
          basedir: __dirname,
          extensions: ['.ts', '.js'],
        }),

原因是 esm 中 require.resolve('./a') 需要写明文件后缀

todo

  • 现有测试用例修改

Closes: #641

@xiaohuoni xiaohuoni changed the title [WIP] feat: add vitest feat: add vitest May 9, 2023
@xiaohuoni
Copy link
Member Author

image
我可能还是青春期,特别的叛逆!

@codecov
Copy link

codecov bot commented May 9, 2023

Codecov Report

Patch coverage: 100.00% and project coverage change: -1.96 ⚠️

Comparison is base (e1565eb) 93.66% compared to head (4a0beef) 91.71%.

Additional details and impacted files
@@            Coverage Diff             @@
##           master     #642      +/-   ##
==========================================
- Coverage   93.66%   91.71%   -1.96%     
==========================================
  Files          55       56       +1     
  Lines        1515     4645    +3130     
  Branches      333      651     +318     
==========================================
+ Hits         1419     4260    +2841     
- Misses         96      381     +285     
- Partials        0        4       +4     
Impacted Files Coverage Δ
src/cli/node.ts 84.84% <100.00%> (ø)
src/prebundler/index.ts 100.00% <100.00%> (ø)
src/types.ts 100.00% <100.00%> (ø)

... and 54 files with indirect coverage changes

☔ View full report in Codecov by Sentry.
📢 Do you have feedback about the report comment? Let us know in this issue.

src/builder/bundless/loaders/javascript/index.ts Outdated Show resolved Hide resolved
src/features/configBuilder/configBuilder.ts Outdated Show resolved Hide resolved
vitest.config.ts Outdated Show resolved Hide resolved
tests/utils.ts Show resolved Hide resolved
tests/g.lint.test.ts Show resolved Hide resolved
tests/fixtures/doctor/errors/src/index.ts Outdated Show resolved Hide resolved
tests/utils.ts Show resolved Hide resolved
@sorrycc sorrycc closed this Aug 6, 2024
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.

测试框架切换到 vitest
4 participants