19 lines
553 B
TypeScript
19 lines
553 B
TypeScript
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');
|
|
});
|
|
});
|