wip
This commit is contained in:
17
tests/unit/website/auth/IracingAuthPageImports.test.ts
Normal file
17
tests/unit/website/auth/IracingAuthPageImports.test.ts
Normal file
@@ -0,0 +1,17 @@
|
||||
import { describe, it, expect } from 'vitest';
|
||||
import fs from 'node:fs';
|
||||
import path from 'node:path';
|
||||
|
||||
describe('IracingAuthPage imports', () => {
|
||||
it('does not import cookies or getAuthService', () => {
|
||||
const filePath = path.resolve(
|
||||
__dirname,
|
||||
'../../../../apps/website/app/auth/iracing/page.tsx',
|
||||
);
|
||||
const source = fs.readFileSync(filePath, 'utf-8');
|
||||
|
||||
expect(source.includes("from 'next/headers'")).toBe(false);
|
||||
expect(source.includes('cookies(')).toBe(false);
|
||||
expect(source.includes('getAuthService')).toBe(false);
|
||||
});
|
||||
});
|
||||
Reference in New Issue
Block a user