Skip to content

Commit

Permalink
Merge pull request #7 from sophiabrandt/fix-console-error-output-in-test
Browse files Browse the repository at this point in the history
suppress console.error in test
  • Loading branch information
sophiabrandt authored Jun 26, 2024
2 parents e9cf9d4 + 8a8a1d9 commit 8d6759e
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 0 deletions.
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
"format": "prettier -w .",
"preview": "vite preview",
"test": "vitest run",
"test:verbose": "vitest --reporter=verbose",
"test:cov": "vitest --coverage",
"test:watch": "vitest --watch",
"test:e2e": "playwright test",
Expand Down
1 change: 1 addition & 0 deletions tests/restaurants/ui/NewRestaurantForm.spec.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -103,6 +103,7 @@ describe('NewRestaurantForm', () => {
describe('when store rejects', () => {
it('should not clear the form', async () => {
// Arrange
vi.spyOn(console, 'error').mockImplementation(() => {});
const { user, newRestaurant } = setup({
createRestaurant: vi.fn().mockRejectedValueOnce('SERVER ERROR'),
});
Expand Down

0 comments on commit 8d6759e

Please sign in to comment.