Full tests coverage
This commit is contained in:
parent
99134d8556
commit
02d782c3da
157 changed files with 1074 additions and 34670 deletions
19
packages/web/tests/proxy.test.ts
Normal file
19
packages/web/tests/proxy.test.ts
Normal file
|
|
@ -0,0 +1,19 @@
|
|||
import { vi, describe, it, expect } from 'vitest';
|
||||
|
||||
// Mock the auth module to prevent loading NextAuth server-side runtime dependencies
|
||||
vi.mock('@/lib/auth', () => {
|
||||
return {
|
||||
auth: vi.fn(),
|
||||
};
|
||||
});
|
||||
|
||||
import { proxy, config } from '../src/proxy';
|
||||
|
||||
describe('middleware proxy configuration', () => {
|
||||
it('exports proxy and route matcher configurations successfully', () => {
|
||||
expect(proxy).toBeDefined();
|
||||
expect(config).toBeDefined();
|
||||
expect(config.matcher).toBeDefined();
|
||||
expect(config.matcher[0]).toContain('api/auth');
|
||||
});
|
||||
});
|
||||
Loading…
Add table
Add a link
Reference in a new issue