Make sure the containers for the databases are running by running docker compose up -d
in this folder.
Run npm run test:e2e
to run the e2e tests for every supported database vendor.
Provide a csv of database drivers in the TEST_DB
environment variable to test specific databases:
TEST_DB=cockroachdb npm run test:e2e
The test suite will spin up a fresh copy of the Directus API from the current build. To use an already running copy of
Directus, set the TEST_LOCAL
flag:
TEST_DB=cockroachdb TEST_LOCAL=true npm run test:e2e
This will use localhost:8055
as the URL for every test. Note: make sure to connect your local Directus database
instance to the test database container found in docker-compose in this folder.
Use npm run test:e2e:watch
to enable Jest's --watch
mode, especially useful in combination with the flags above.
This does not watch changes to Directus; it only watches changes to the tests.