Skip to content

Commit

Permalink
test(cli): make it easier to configure token for running cli tests lo…
Browse files Browse the repository at this point in the history
…cally
  • Loading branch information
bjoerge committed Dec 9, 2024
1 parent 397194c commit 0799a4a
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 0 deletions.
3 changes: 3 additions & 0 deletions .env.example
Original file line number Diff line number Diff line change
Expand Up @@ -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=
6 changes: 6 additions & 0 deletions packages/@sanity/cli/vitest.config.mts
Original file line number Diff line number Diff line change
@@ -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: {
Expand Down

0 comments on commit 0799a4a

Please sign in to comment.