fix: replace revalidate with cache force-cache for SSG compatibility
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
import { describe, it, expect, vi, beforeEach } from 'vitest';
|
||||
import { render, screen } from '@testing-library/react';
|
||||
import { SidebarNav } from './SidebarNav';
|
||||
import { beforeEach, describe, expect, it, vi } from 'vitest';
|
||||
import type { NavItem } from '../model/types';
|
||||
import { SidebarNav } from './SidebarNav';
|
||||
|
||||
const ITEMS: NavItem[] = [
|
||||
{ id: 'bio', label: 'Bio', number: '01' },
|
||||
@@ -9,13 +9,11 @@ const ITEMS: NavItem[] = [
|
||||
];
|
||||
|
||||
beforeEach(() => {
|
||||
global.IntersectionObserver = vi.fn(function () {
|
||||
return {
|
||||
observe: vi.fn(),
|
||||
disconnect: vi.fn(),
|
||||
unobserve: vi.fn(),
|
||||
};
|
||||
}) as unknown as typeof IntersectionObserver;
|
||||
global.IntersectionObserver = class {
|
||||
observe = vi.fn();
|
||||
disconnect = vi.fn();
|
||||
unobserve = vi.fn();
|
||||
} as unknown as typeof IntersectionObserver;
|
||||
});
|
||||
|
||||
describe('SidebarNav', () => {
|
||||
|
||||
Reference in New Issue
Block a user