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

test(vitest): Migrate karma to vitest #3866

Merged
merged 1 commit into from
Aug 8, 2024
Merged

Conversation

netil
Copy link
Member

@netil netil commented Aug 8, 2024

Issue

#3681

Details

Migrate all tests to be ran on vitest

  • Remove unnecessary packages
  • Remove mocha in favor of vitest builtins
  • Update test APIs

Test ran results

Note

  • Packages version:

    • Karma v6.4.4
      • Mocha v10.7.0
      • Chai v4.3.10
    • Vitest v2.0.5
      • webdriverio v8.39.1
      • playwright v1.46.0
  • All duration values are in seconds

a) Local

Note

Mac Studio M1 Max, 32GB
MacOS Sonoma 14.5

Packages Duration Diff over Karma
Karma (Mocha + Chai) 142.382 -
Vitest (webdriverio:chrome) 144.364* +1.39%
Vitest (playwright:chromium) 51.606** -63.75%
Attempts Vitest (webdriverio:chrome)* Vitest (playwright:chromium)**
1 146.48 53.61
2 150.33 50.91
3 141.22 51.21
4 142.03 51.32
5 141.76 50.98
Avg 144.364 51.606

b) on CI

Node.js v20

Packages Duration Diff over Karma
Karma & Mocha 148.148 -
Vitest (webdriverio:chrome) 195.60 +32%
Vitest (playwright:chromium) 138.14 -6.75%

Migrate all tests to be ran on vitest

Ref naver#3681
@coveralls
Copy link

Coverage Status

coverage: 94.262% (+0.5%) from 93.771%
when pulling 4967179 on netil:test#3681
into 0cd83af on naver:master.

@netil netil merged commit 051e821 into naver:master Aug 8, 2024
10 checks passed
@netil netil deleted the test#3681 branch August 8, 2024 05:30
netil pushed a commit to netil/billboard.js that referenced this pull request Aug 22, 2024
- remove unused imports
- import afterAll

Ref naver#3866
netil added a commit that referenced this pull request Aug 22, 2024
- remove unused imports
- import afterAll

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

Successfully merging this pull request may close these issues.

2 participants