Files
gridpilot.gg/tests/unit/website/auth/IracingAuthPageImports.test.ts
2025-12-04 11:54:42 +01:00

17 lines
566 B
TypeScript

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);
});
});