File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1- import { expect } from "bun:test" ;
21import { mkdtemp , cp , rm , realpath } from "node:fs/promises" ;
32import { join } from "node:path" ;
43import { tmpdir } from "node:os" ;
@@ -168,11 +167,15 @@ export async function setupFixture(name: FixtureName): Promise<Fixture> {
168167
169168 const publishableKeyName = await detectPublishableKeyName ( projectDir ) ;
170169 publishableKey = envVars [ publishableKeyName ] ?? "" ;
171- expect ( publishableKey ) . toMatch ( / ^ p k _ ( t e s t | l i v e ) _ [ a - z 0 - 9 ] + $ / ) ;
170+ if ( ! publishableKey ) {
171+ throw new Error ( `${ publishableKeyName } not found in env files written by clerk init.` ) ;
172+ }
172173
173174 const secretKeyName = await detectSecretKeyName ( projectDir ) ;
174175 secretKey = envVars [ secretKeyName ] ?? "" ;
175- expect ( secretKey ) . toMatch ( / ^ s k _ ( t e s t | l i v e ) _ [ a - z 0 - 9 ] + $ / ) ;
176+ if ( ! secretKey ) {
177+ throw new Error ( `${ secretKeyName } not found in env files written by clerk init.` ) ;
178+ }
176179
177180 const install = await Bun . $ `npm ci --ignore-scripts --legacy-peer-deps`
178181 . cwd ( projectDir )
You can’t perform that action at this time.
0 commit comments