Skip to content

Conversation

stevensJourney
Copy link
Collaborator

@stevensJourney stevensJourney commented Mar 7, 2025

Overview

The JS Web unit tests are still failing quite often.

This PR makes some improvements which cause the tests to pass in CI more often.

  • Updated Vitest and Playwright to the latest versions
  • Improved the structure for shared tests. Shared tests for with/without webworkers and OPFS are now performed using shared test describing methods. The test suites are now separated for different DB configurations. Previously the tests would diverge on the individual test level.
  • A subtle race condition in the closing of async DBAdapters has been fixed. This ensures a DBAdapter should be completely closed when powersync.close has been called.
  • Vitest still tries to run unit tests concurrently, even if sequential is specified, this can cause locking timeouts. Testing DB generator methods have been updated to use random dbFileNames to isolate tests better.
  • Tests have been updated to use onTestFinished for closing/disposing PowerSync clients when the test completed.

@changeset-bot
Copy link

changeset-bot bot commented Mar 7, 2025

🦋 Changeset detected

Latest commit: 21c104b

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 6 packages
Name Type
@powersync/common Patch
@powersync/web Patch
@powersync/op-sqlite Patch
@powersync/react-native Patch
@powersync/tanstack-react-query Patch
@powersync/diagnostics-app Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@stevensJourney stevensJourney marked this pull request as ready for review March 7, 2025 08:45
@stevensJourney stevensJourney merged commit fe98172 into main Mar 7, 2025
6 checks passed
@stevensJourney stevensJourney deleted the clean-tests branch March 7, 2025 09:18
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