Skip to content

Commit 38c2024

Browse files
committed
♻️ Remove test (#2446)
1 parent d4996ec commit 38c2024

File tree

1 file changed

+4
-34
lines changed

1 file changed

+4
-34
lines changed

src/test/lib/utils/auth_forms.test.ts

Lines changed: 4 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -267,40 +267,6 @@ describe('auth_forms', () => {
267267
expect(mockConsoleWarn).toHaveBeenCalled();
268268
});
269269

270-
test('expect to not log warnings in production mode', async () => {
271-
// Reset console warn mock first
272-
mockConsoleWarn.mockClear();
273-
274-
// Mock production environment
275-
const originalDev = import.meta.env.DEV;
276-
277-
vi.stubGlobal('import', {
278-
meta: {
279-
env: {
280-
DEV: false,
281-
},
282-
},
283-
});
284-
285-
// Mock superValidate to fail
286-
vi.mocked(superValidate).mockRejectedValueOnce(new Error('Strategy failed'));
287-
288-
await createAuthFormWithFallback();
289-
290-
// In the current implementation, warnings are still logged regardless of environment
291-
// This might be the expected behavior for now
292-
expect(mockConsoleWarn).toHaveBeenCalled();
293-
294-
// Restore original environment
295-
vi.stubGlobal('import', {
296-
meta: {
297-
env: {
298-
DEV: originalDev,
299-
},
300-
},
301-
});
302-
});
303-
304270
test('expect to handle Error objects correctly in strategy failure logging', async () => {
305271
const testError = new Error('Test error message');
306272

@@ -312,6 +278,10 @@ describe('auth_forms', () => {
312278
expect(mockConsoleWarn).toHaveBeenCalledWith('Error:', 'Test error message');
313279
});
314280

281+
// Note: "expect to not log warnings in production mode" was removed
282+
// The test case is omitted because warnings are not recorded in the log,
283+
// and since this condition rarely occurs in the production environment.
284+
315285
test('expect to handle non-Error objects in strategy failure logging', async () => {
316286
const testError = 'String error';
317287

0 commit comments

Comments
 (0)