PR-420915: Changing the logic for aliases for one source of truth on tsconfig.json and updating packages.

This commit is contained in:
2023-02-21 00:10:34 +00:00
parent 176636ea6b
commit 0bbe080ea0
15 changed files with 1279 additions and 1154 deletions

View File

@ -2,7 +2,3 @@ declare module "*.svg" {
const content: any;
export default content;
}
declare module "@config" {
export const config: any;
}

View File

@ -5,7 +5,7 @@ import { createMemoryHistory } from 'history';
import initialStateReducer from '../frontend/reducers/initialState';
import setStore from '../frontend/setStore';
const ProviderMock = ({ children, initialState }) => {
export const ProviderMock = ({ children, initialState }: { children: any, initialState?: any}) => {
let initialStateMock = initialStateReducer
if(initialState !== undefined){
@ -24,4 +24,4 @@ const ProviderMock = ({ children, initialState }) => {
)
}
export default ProviderMock;
export default ProviderMock;

View File

@ -1 +1,2 @@
module.exports = '';
export const fileMock = '';
module.exports = fileMock;

1
src/__mocks__/index.ts Normal file
View File

@ -0,0 +1 @@
export * from './ProviderMock';

View File

@ -14,7 +14,7 @@ export interface IChangeHelloPayload {
export type TTest = IChangeHello
const changeHello = (payload: string) => ({
type: 'CREATE_USER',
type: ActionTypesTest.ChangeHello,
payload
})

View File

@ -1,7 +1,7 @@
import React from 'react';
import { render } from '@testing-library/react';
import ProviderMock from '../../../__mocks__/ProviderMock';
import App from '../App';
import { ProviderMock } from '@mocks';
import App from '@components/App';
describe('<App/> Component', () => {
beforeEach(() => {
@ -15,7 +15,7 @@ describe('<App/> Component', () => {
}));
render(
<ProviderMock initialState={undefined}>
<ProviderMock>
<App />
</ProviderMock>
)