Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Refactor: replace test suite with vitest (#2328)
* test: first introduction of vitest * test: update create update test * test: update entities to use vitest * test: WIP - first entity type test refactor - content-types * test: finally get content types tests rewritten, including all instance-entity-methods * chore: delete old js file * fix: fix mocks and type them * test: refactor test/unit/entities to typescript and vitest * refactor: port 4 more tests to TS + vitest * refactor: port makeRequest helper to vitest * test: refactor create ogranization api test * test: refactor environment api to vitest * test: refactor plain iterator tests * test: small fixes * test: migrate webhook test and prepare for plain client tests * test: migrate rest adapter test * test: migrate raw http request test * test: migrate app-action-call tests * test: rewrite entity mocks to be fully typed, complete and consistent in id mocking * test: rewrite rest adapter tests - some still failing - sorry * test: adjust other test files for new mocked ids * build: make vitest/rollup run again * style: add type to imports when only types are imported * build: try to have less changes in the lock file * test: add passing app definition api test - what a hell of a ride for one file * test: rewrite create-space-api test * test: rewrite create-ui-config-api-test and create-user-ui-config-api-test * test: rewrite test/unit/plain tests to vitest (most not working yet) * test: rewrite last files in unit tests to new vitest syntax * test(integration): first integration test passing with vitest * test(integration): rewrite all app related integration tests to vitest * test(integration): rewrite more integration tests * test(integration): move and rewrite plain client integration test * test(integration): rewrite more test files to vitest * test(integration): make ts more happy * test(integration): remove custom timeouts as we will inforce them globally soon * test(integration): rewrite environment test * test(integration): cleanups + rewrite 3 more tests * test(integration): rewrite resource related tests * test(integration): role and scheduled action * test(integration): rewrite last integration tests * test(unit): refactor some new tests that got merged into the branch * tests: remove last leftovers of chai and sinon in test code * chore: remove sinon, mocha, chai, rewire and karma * test: use vitest workspaces feature to run tests in browser as well and clean up/simplify calling of different test environments * chore: remove excessive e2e file * test: integration tests can now be executed in the browser * test: TEMPORARILY let integration tests run right away * test: make node and browser tests both execute happily next to each other * test: fix mocking of rest adapter in unit tests * test(unit): speed up app call tests that re-poll full 15 times * test: make most unit tests pass * test(unit): make all unit tests pass * test: make browser and integration tests execute * test: make webhook plain client test run in browser by replacing crypto package to mock payload data * test: integration tests now pass, and dont get stuck in rate limiting as it seems. hurray * test: adjust bundle max sizes to new bigger bundles * test(unit): fix locale collection wrapping test * test(integration): rate limiting timeout is now a fixed second as this is enough - slightly improving integration test runtime * chore: remove old comments * test: use vitest for coverage report * build: npm dedupe * build: ensure vitest is latest version * Update test/helpers.ts Co-authored-by: Mitch Goudy <[email protected]> * Update config.yml re-require unit tests to pass before we run the integration tests * test(unit): adjust new tests from merge to pass --------- Co-authored-by: Mitch Goudy <[email protected]>
- Loading branch information