Skip to content

test: add tests for utils in devtools-vite#77

Merged
antfu merged 10 commits into
vitejs:mainfrom
liangmiQwQ:test/add-utils-test-in-devtools-vite
Aug 12, 2025
Merged

test: add tests for utils in devtools-vite#77
antfu merged 10 commits into
vitejs:mainfrom
liangmiQwQ:test/add-utils-test-in-devtools-vite

Conversation

@liangmiQwQ
Copy link
Copy Markdown
Contributor

Added some tests in package/devtools-vite/src/app/utils/__tests__/

It helped me to find and fix #75 #73

% Coverage report from v8

Before:

File Stmts Branch Funcs Lines
All Files 1.74 40.28 33.67 1.74
devtools-vite/src/app/utils 21.32 79.41 62.06 21.32
cache.ts 78.12 89.65 70.83 78.12
color.ts 0 0 0 0
filepath.ts 0 0 0 0
format.ts 0 100 100 0
icon.ts 0 0 0 0
is.ts 0 0 0 0

After:

File Stmts Branch Funcs Lines
All Files 4.64 53.95 39.61 4.64
devtools-vite/src/app/utils 93.39 90.19 85 93.39
cache.ts 87.5 87.5 76 87.5
color.ts 86.95 90.9 100 86.95
filepath.ts 95.52 96.66 100 95.52
format.ts 87.5 76.47 100 87.5
icon.ts 100 100 100 100
is.ts 100 100 100 100

@antfu antfu merged commit d0885a2 into vitejs:main Aug 12, 2025
4 checks passed
@liangmiQwQ liangmiQwQ deleted the test/add-utils-test-in-devtools-vite branch October 1, 2025 10:48
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.

2 participants