Skip to content

Commit

Permalink
Remove unnecessary include in tsconfig to fix build. Fix unit tests b…
Browse files Browse the repository at this point in the history
…reaking build.
  • Loading branch information
jbouder committed Jul 28, 2024
1 parent 10bf439 commit b016c20
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/components/footer/footer.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ describe('Footer', () => {
});

test('should scroll to top', async () => {
window.scrollTo = vi.fn();
vi.spyOn(window, 'scrollTo').mockImplementation(() => {});
render(<Footer />);

window.scrollTo(100, 100);
Expand Down
2 changes: 1 addition & 1 deletion src/components/header/header.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -77,8 +77,8 @@ describe('Header', () => {
});

test('should display menu when button is clicked', async () => {
vi.spyOn(window, 'scrollTo').mockImplementation(() => {});
const { baseElement } = render(headerComponent);
global.scrollTo = vi.fn();
global.innerWidth = 500;
window.dispatchEvent(new Event('resize'));

Expand Down
2 changes: 1 addition & 1 deletion tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,6 @@
"@src/utils/*": ["src/utils/*"]
}
},
"include": ["src", "vite.config.ts"],
"include": ["src"],
"references": [{ "path": "./tsconfig.node.json" }]
}

0 comments on commit b016c20

Please sign in to comment.