Skip to content

Commit 597d1ab

Browse files
committed
fix: test코드에서 env 할당하지 않고 supabse 인스턴스가 값을 갖도록 수정
1 parent 1bee367 commit 597d1ab

File tree

2 files changed

+1
-2
lines changed

2 files changed

+1
-2
lines changed

src/supabase/index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,6 @@ import { Database } from './supabse.types.ts';
33

44
const supabaseUrl = 'https://gfdlxyizcyatrunsajun.supabase.co';
55
const supabaseKey = import.meta.env.VITE_SUPABASE_KEY as string;
6-
const supabase = createClient<Database>(supabaseUrl, supabaseKey);
6+
const supabase = createClient<Database>(supabaseUrl, supabaseKey ?? 'supabase key for passing test');
77

88
export default supabase;

src/tests/ChangePassword.test.tsx

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,6 @@ vi.mock('@/supabase');
1313
describe('ChangePassword', async () => {
1414
beforeEach(() => {
1515
render(<ChangePasswordForm />, { wrapper });
16-
process.env.VITE_SUPABASE_KEY = 'useless_test_api_key';
1716
});
1817
afterEach(() => {
1918
vi.resetAllMocks();

0 commit comments

Comments
 (0)