Skip to content

Commit 7fd8d23

Browse files
m-hulbertclaude
andcommitted
fixup! test(nav): update sidebar tests for new navigation structure
fixup! test(nav): update sidebar tests for new navigation structure Fix lint: suppress no-var-requires for require inside jest.mock. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
1 parent b415c86 commit 7fd8d23

File tree

1 file changed

+8
-5
lines changed

1 file changed

+8
-5
lines changed

src/components/Layout/LeftSidebar.test.tsx

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -36,12 +36,15 @@ jest.mock('gatsby', () => ({
3636
}));
3737

3838
jest.mock('../Link', () => {
39+
// eslint-disable-next-line @typescript-eslint/no-var-requires
3940
const { forwardRef } = require('react');
40-
const MockLink = forwardRef(({ children, to, ...props }: { children: React.ReactNode; to: string }, ref: React.Ref<HTMLAnchorElement>) => (
41-
<a href={to} ref={ref} {...props}>
42-
{children}
43-
</a>
44-
));
41+
const MockLink = forwardRef(
42+
({ children, to, ...props }: { children: React.ReactNode; to: string }, ref: React.Ref<HTMLAnchorElement>) => (
43+
<a href={to} ref={ref} {...props}>
44+
{children}
45+
</a>
46+
),
47+
);
4548
MockLink.displayName = 'MockLink';
4649
return MockLink;
4750
});

0 commit comments

Comments
 (0)