-
Notifications
You must be signed in to change notification settings - Fork 1
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
Refactor(web-react): Use @local/tests
path alias in tests
#1807
base: main
Are you sure you want to change the base?
Changes from all commits
9a9a6d6
fe5222d
b997fce
3b281f4
fa7e713
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -13,6 +13,13 @@ const config = { | |
// Automatically clear mock calls, instances, contexts and results before every test. | ||
// https://jestjs.io/docs/configuration#clearmocks-boolean | ||
clearMocks: true, | ||
|
||
// A map from regular expressions to module names or to arrays of module names | ||
// https://jestjs.io/docs/configuration#modulenamemapper-objectstring-string--arraystring | ||
moduleNameMapper: { | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. suggestion (if-minor): Consider using |
||
'^@local/(.*)': '<rootDir>/$1', | ||
'^@local/tests/(.*)': '<rootDir>/tests/$1', | ||
}, | ||
}; | ||
|
||
export default config; |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,7 @@ | ||
import '@testing-library/jest-dom'; | ||
import { render } from '@testing-library/react'; | ||
import React from 'react'; | ||
import { classNamePrefixProviderTest } from '../../../../tests/providerTests/classNamePrefixProviderTest'; | ||
import { restPropsTest } from '../../../../tests/providerTests/restPropsTest'; | ||
import { stylePropsTest } from '../../../../tests/providerTests/stylePropsTest'; | ||
import { classNamePrefixProviderTest, restPropsTest, stylePropsTest } from '@local/tests'; | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. todo (if-minor): We need to setup the correct import order. Maybe @curdaj can help with it. |
||
import Accordion from '../Accordion'; | ||
|
||
describe('Accordion', () => { | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
thought (if-minor): It looks like this option have no effect on the current code. @curdaj