Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixes #2669 : Refactored src/screen/PageNotFound component test from jest to vitest #2670

Open
wants to merge 5 commits into
base: develop-postgres
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions __mocks__/styleMock.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
// __mocks__/styleMock.js
module.exports = {};
2 changes: 2 additions & 0 deletions jest.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
'!**/index.{js,ts}',
'!**/*.d.ts',
'!src/test/**',
'!vitest.config.ts',],

Check failure on line 13 in jest.config.js

View workflow job for this annotation

GitHub Actions / Performs linting, formatting, type-checking, checking for different source and target branch

Insert `⏎··`
// setupFiles: ['react-app-polyfill/jsdom'],
setupFiles: ['whatwg-fetch'],
setupFilesAfterEnv: ['<rootDir>/src/setupTests.ts'],
Expand Down Expand Up @@ -42,6 +42,8 @@
'\\.svg\\?react$': '<rootDir>/scripts/__mocks__/fileMock.js',
'\\.svg$': '<rootDir>/scripts/__mocks__/fileMock.js',
'^@pdfme/generator$': '<rootDir>/scripts/__mocks__/@pdfme/generator.ts',
'\\.module\\.css$': 'identity-obj-proxy',
'\\.(css|less|scss|sass)$': '<rootDir>/__mocks__/styleMock.ts',

Check failure on line 46 in jest.config.js

View workflow job for this annotation

GitHub Actions / Performs linting, formatting, type-checking, checking for different source and target branch

Delete `·`
},
moduleFileExtensions: [
'web.js',
Expand Down
1 change: 1 addition & 0 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import { store } from 'state/store';
import PageNotFound from './PageNotFound';
import i18nForTest from 'utils/i18nForTest';
import useLocalStorage from 'utils/useLocalstorage';

import { test, expect, describe } from 'vitest';
const { setItem } = useLocalStorage();

describe('Testing Page not found component', () => {
Expand Down
Loading