npm-packages/js-integration-tests/README.md
These tests use the ConvexHttpClient and ConvexReactClient to talk to a real
backend.
Run just test from this directory to run a rush build, and then run
integration tests.
Once that's done, you can run just _test during subsequent iterations if
you're only modifying the test suite. This will speed things up as it does not
rerun the rush build, it only spins up a backend and re-runs the test suite.
just test someFile.test.ts
just _test conductor-debug someFile.test.ts
Remember that your file name needs to end in .test.ts or .test.tsx.
Because all of these tests run against the same backend, there is a large risk of leaking state between tests.
To solve this we:
maxWorkers to 1 so only 1 test runs at a time.cleanUp mutation that deletes all data after each test.To ensure that cleanUp is complete, make sure to:
schema.ts:ALL_TABLE_NAMES so we clear the table
after every test.