File tree Expand file tree Collapse file tree 2 files changed +17
-9
lines changed Expand file tree Collapse file tree 2 files changed +17
-9
lines changed Original file line number Diff line number Diff line change 11import type { UserProps , DevCycleJWTClaims } from '../../src/types'
2+ import { defaultEnv } from './fixtures'
23
34/**
45 * Creates a mock JWT token for testing
@@ -77,16 +78,9 @@ export function createMockOAuthKV() {
7778 */
7879export function createMockEnv ( overrides : Partial < Env > = { } ) : Env {
7980 return {
80- NODE_ENV : 'test' ,
81- API_BASE_URL : 'https://api-test.devcycle.com' ,
82- AUTH0_DOMAIN : 'test-auth.devcycle.com' ,
83- AUTH0_AUDIENCE : 'https://api-test.devcycle.com/' ,
84- AUTH0_SCOPE : 'openid profile email offline_access' ,
85- AUTH0_CLIENT_ID : 'test-client-id' ,
86- AUTH0_CLIENT_SECRET : 'test-client-secret' ,
87- ENABLE_OUTPUT_SCHEMAS : 'false' ,
81+ ...defaultEnv ,
8882 OAUTH_KV : createMockOAuthKV ( ) ,
89- MCP_OBJECT : { } as any , // Mock Durable Object
83+ MCP_OBJECT : { } as any ,
9084 ...overrides ,
9185 } as Env
9286}
Original file line number Diff line number Diff line change @@ -84,3 +84,17 @@ export const mockApiResponses = {
8484 } ,
8585 ] ,
8686}
87+
88+ /**
89+ * Default test environment values
90+ */
91+ export const defaultEnv = {
92+ NODE_ENV : 'test' ,
93+ API_BASE_URL : 'https://api-test.devcycle.com' ,
94+ AUTH0_DOMAIN : 'test-auth.devcycle.com' ,
95+ AUTH0_AUDIENCE : 'https://api-test.devcycle.com/' ,
96+ AUTH0_SCOPE : 'openid profile email offline_access' ,
97+ AUTH0_CLIENT_ID : 'test-client-id' ,
98+ AUTH0_CLIENT_SECRET : 'test-client-secret' ,
99+ ENABLE_OUTPUT_SCHEMAS : 'false' ,
100+ } as const
You can’t perform that action at this time.
0 commit comments