diff --git a/.env.example b/.env.example index 8f03c8d450e..45ac2a721cb 100644 --- a/.env.example +++ b/.env.example @@ -14,3 +14,6 @@ SANITY_E2E_BASE_URL=http://localhost:3339 # Whether or not to run the end to end tests in headless mode. Defaults to true, but sometimes # you might want to see the browser in action, in which case you can set this to `false`. HEADLESS=true + +# Token for running CLI tests locally +SANITY_CI_CLI_AUTH_TOKEN_STAGING= diff --git a/packages/@sanity/cli/vitest.config.mts b/packages/@sanity/cli/vitest.config.mts index 8266470689a..b48d657579f 100644 --- a/packages/@sanity/cli/vitest.config.mts +++ b/packages/@sanity/cli/vitest.config.mts @@ -1,4 +1,10 @@ import {defineConfig} from '@repo/test-config/vitest' +// needed for globalSetup +import dotenv from 'dotenv' + +dotenv.config({ + path: [`${__dirname}/../../../.env.local`, `${__dirname}/../../../.env`], +}) export default defineConfig({ test: {