Skip to content

Commit c07cfec

Browse files
committed
Fix tsconfig duplicates in tests env.
1 parent a06691b commit c07cfec

File tree

2 files changed

+6
-5
lines changed

2 files changed

+6
-5
lines changed

packages/react-test-utils/src/index.tsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@ export function mockWebpackShareScope() {
2222

2323
export function mockFetch() {
2424
if (!globalThis.fetch) {
25+
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
2526
// @ts-ignore
2627
globalThis.fetch = fetchPolyfill;
2728
}
@@ -100,7 +101,7 @@ export function mockPluginData(
100101
moduleMock?: ModuleMock;
101102
config?: AppsConfig;
102103
} = {},
103-
api: ScalprumProviderProps['api'] = {}
104+
api: ScalprumProviderProps['api'] = {},
104105
) {
105106
const response: Response = {
106107
blob: () => Promise.resolve(new Blob()),

packages/test-app/src/test-utils-specs/scalprum-provider-rendering.test.tsx renamed to packages/test-app/src/test-utils-specs/scalprum-provider-rendering.test.jsx

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,18 @@
1-
import React, { PropsWithChildren } from 'react';
1+
import React from 'react';
22
import { render, cleanup, act, screen } from '@testing-library/react';
33

44
import { ScalprumComponent, ScalprumProvider, useScalprum } from '@scalprum/react-core';
5-
import { AppsConfig, removeScalprum } from '@scalprum/core';
5+
import { removeScalprum } from '@scalprum/core';
66
import { DEFAULT_MODULE_TEST_ID, mockPluginData } from '@scalprum/react-test-utils';
77

8-
const InitGate = ({ children }: PropsWithChildren<{}>) => {
8+
const InitGate = ({ children }) => {
99
const { initialized } = useScalprum();
1010
if (!initialized) {
1111
return null;
1212
}
1313
return <>{children}</>;
1414
};
15-
const TestComponent = ({ config = {}, children }: PropsWithChildren<{ config?: AppsConfig }>) => {
15+
const TestComponent = ({ config = {}, children }) => {
1616
return (
1717
<ScalprumProvider config={config}>
1818
<div data-testid="static-child">Test</div>

0 commit comments

Comments
 (0)