Skip to content

Commit 567f7a2

Browse files
committed
Move publishableKey into const in fixture
1 parent 05612be commit 567f7a2

File tree

2 files changed

+2
-10
lines changed

2 files changed

+2
-10
lines changed

jest.config.cjs

-4
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,3 @@
1-
const { env } = require('node:process')
2-
3-
env.SEAM_PUBLISHABLE_KEY = 'seam_pk1fGd41X_zKs0ZELRWEc8nWxiBsrTFC98'
4-
51
/** @type {import('ts-jest').JestConfigWithTsJest} */
62
module.exports = {
73
preset: 'ts-jest/presets/default-esm',

test/fixtures/react.tsx

+2-6
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,11 @@
1-
import { env } from 'node:process'
2-
31
import { render } from '@testing-library/react'
42
import { type ReactElement, type ReactNode } from 'react'
53

64
import { SeamProvider } from 'index.js'
75

6+
const publishableKey = 'seam_pk1fGd41X_zKs0ZELRWEc8nWxiBsrTFC98'
7+
88
const Providers = ({ children }: { children: ReactNode }): ReactElement => {
9-
const publishableKey = env['SEAM_PUBLISHABLE_KEY']
10-
if (publishableKey == null) {
11-
throw new Error('Missing SEAM_PUBLISHABLE_KEY')
12-
}
139
return <SeamProvider publishableKey={publishableKey}>{children}</SeamProvider>
1410
}
1511

0 commit comments

Comments
 (0)