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: improve unit and e2e test organization and reliability #624

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

edodusi
Copy link
Contributor

@edodusi edodusi commented Dec 27, 2024

Test improvements

This PR enhances both unit tests and e2e tests organization and reliability.

Changes

Unit Tests

  • Improved test organization
  • Added mock strategy for API calls using fetch
  • Enhanced bridge URL testing
  • Enhanced RichText testing
  • Added proper pagination testing
  • ...and more

E2E Tests (Cypress)

  • Fixed TypeScript configuration for Cypress
  • Moved repeated test URL to constant
  • Added proper console spy setup in beforeEach

Testing

The changes have been verified by running:

  • pnpm test:unit for unit tests
  • pnpm test:e2e for e2e tests

All tests pass successfully and provide better coverage and reliability.

Notes

  • No changes to actual implementation code
  • No changes to public API

@edodusi edodusi force-pushed the test/add-more-tests branch from 6e3c94c to 755e9af Compare December 27, 2024 16:55
Copy link

pkg-pr-new bot commented Dec 27, 2024

Open in Stackblitz

npm i https://pkg.pr.new/storyblok/storyblok-js/@storyblok/js@624

commit: 755e9af

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.

1 participant