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

Refactor: replace test suite with vitest #2328

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

Conversation

axe312ger
Copy link
Collaborator

@axe312ger axe312ger commented Jun 20, 2024

As this is the only public repo with mocha/chai/sinon left, this moves it to the modern jest/vitest syntax.

We did the same for the sdk-core and the contentful.js --> contentful/contentful-sdk-core#438 + contentful/contentful.js#2169

  • unit tests with vitest
    • no more memory overflows / timeouts
    • test time down from ~2m 36s to ~56s
  • integration tests with vitest
    • no more false negatives / integration tests now pass every time (at lest as long noone else is running them at the same time)
    • test time a little up from ~7m 41s to ~11m (but as they pass all the time, its still a win!)
  • run unit and integration tests in browser with vitest (only for manual execution)
  • turn all tests into TypeScript
  • adjusted mocked data to match TS interfaces
  • small cleanups and removed outdated and unused e2e tests

@axe312ger axe312ger added the WIP label Jun 20, 2024
@axe312ger axe312ger self-assigned this Jun 20, 2024
@axe312ger axe312ger changed the base branch from refactor/modern-esm-support to build/cleanup-dependencies June 27, 2024 08:38
Base automatically changed from build/cleanup-dependencies to test/fix-integration July 17, 2024 14:15
Base automatically changed from test/fix-integration to master July 18, 2024 14:33
@wiz-inc-38d59fb8d7
Copy link

wiz-inc-38d59fb8d7 bot commented Sep 27, 2024

Wiz Scan Summary

Scan Module Critical High Medium Low Info Total
IaC Misconfigurations 0 0 0 0 0 0
Vulnerabilities 0 0 0 0 0 0
Sensitive Data 0 0 0 0 0 0
Secrets 0 0 0 0 0 0
Total 0 0 0 0 0 0

View scan details in Wiz

To detect these findings earlier in the dev lifecycle, try using Wiz Code VS Code Extension.

…nd clean up/simplify calling of different test environments
@axe312ger axe312ger changed the title WIP - Refactor: replace test suite with vitest Refactor: replace test suite with vitest Nov 8, 2024
@axe312ger axe312ger marked this pull request as ready for review November 8, 2024 09:56
@axe312ger axe312ger requested a review from a team as a code owner November 8, 2024 09:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants