-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: adding root files in eslint command
- Loading branch information
1 parent
6500eee
commit eb7063f
Showing
2 changed files
with
11 additions
and
11 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,26 +1,26 @@ | ||
|
||
import { expect, afterEach, vi } from 'vitest' | ||
import { cleanup } from '@testing-library/react' | ||
import matchers from '@testing-library/jest-dom/matchers' | ||
import matchers from '@testing-library/jest-dom/matchers'; | ||
import { cleanup } from '@testing-library/react'; | ||
import { setLogger } from 'react-query'; | ||
import { afterEach, expect, vi } from 'vitest'; | ||
|
||
import { setupI18n } from './src/lib/i18n'; | ||
|
||
void setupI18n() | ||
void setupI18n(); | ||
|
||
// extends Vitest's expect method with methods from react-testing-library | ||
expect.extend(matchers) | ||
expect.extend(matchers); | ||
|
||
|
||
vi.stubGlobal('scrollTo', vi.fn()) | ||
vi.stubGlobal('scrollTo', vi.fn()); | ||
|
||
setLogger({ | ||
log: console.log, | ||
warn: console.warn, | ||
// ✅ no more errors on the console | ||
// They will get caught and handled accordingly, just not adding any trace noise on test suite | ||
error: () => null, | ||
}); | ||
|
||
// runs a cleanup after each test case (e.g. clearing jsdom) | ||
afterEach(() => { | ||
cleanup() | ||
}) | ||
cleanup(); | ||
}); |