wip
This commit is contained in:
@@ -10,10 +10,12 @@ import { describe, it, expect } from 'vitest';
|
||||
|
||||
describe('RootLayout auth caching behavior', () => {
|
||||
it('is configured as dynamic to avoid static auth caching', async () => {
|
||||
const layoutModule = await import('../../../../apps/website/app/layout');
|
||||
|
||||
const layoutModule = (await import(
|
||||
'../../../../apps/website/app/layout',
|
||||
)) as { dynamic?: string };
|
||||
|
||||
// Next.js dynamic routing flag
|
||||
const dynamic = (layoutModule as any).dynamic;
|
||||
const dynamic = layoutModule.dynamic;
|
||||
|
||||
expect(dynamic).toBe('force-dynamic');
|
||||
});
|
||||
@@ -21,9 +23,11 @@ describe('RootLayout auth caching behavior', () => {
|
||||
|
||||
describe('Dashboard auth caching behavior', () => {
|
||||
it('is configured as dynamic to evaluate auth per request', async () => {
|
||||
const dashboardModule = await import('../../../../apps/website/app/dashboard/page');
|
||||
|
||||
const dynamic = (dashboardModule as any).dynamic;
|
||||
const dashboardModule = (await import(
|
||||
'../../../../apps/website/app/dashboard/page',
|
||||
)) as { dynamic?: string };
|
||||
|
||||
const dynamic = dashboardModule.dynamic;
|
||||
|
||||
expect(dynamic).toBe('force-dynamic');
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user