mirror of
https://github.com/reduxjs/redux-devtools.git
synced 2025-07-27 00:19:55 +03:00
Fix tests
This commit is contained in:
parent
f28948e708
commit
c15eca8825
|
@ -1,4 +1,4 @@
|
|||
import map2tree, { Node } from '../src';
|
||||
import { map2tree, Node } from '../src';
|
||||
import * as immutable from 'immutable';
|
||||
|
||||
test('# rootNodeKey', () => {
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
import React from 'react';
|
||||
import { createRenderer } from 'react-test-renderer/shallow';
|
||||
|
||||
import JSONTree from '../src/index';
|
||||
import { JSONTree } from '../src/index';
|
||||
import JSONNode from '../src/JSONNode';
|
||||
|
||||
const BASIC_DATA = { a: 1, b: 'c' };
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
import React from 'react';
|
||||
import { render, screen } from '@testing-library/react';
|
||||
import StackTraceTab from '../src/StackTraceTab';
|
||||
import { TraceTab } from '../src/StackTraceTab';
|
||||
|
||||
const actions = {
|
||||
0: { type: 'PERFORM_ACTION', action: { type: '@@INIT' } },
|
||||
|
@ -14,18 +14,18 @@ const actions = {
|
|||
},
|
||||
};
|
||||
|
||||
const StackTraceTabAsAny = StackTraceTab as any;
|
||||
const TraceTabAsAny = TraceTab as any;
|
||||
|
||||
describe('StackTraceTab component', () => {
|
||||
it('should render with no props', async () => {
|
||||
const { container } = render(<StackTraceTabAsAny />);
|
||||
const { container } = render(<TraceTabAsAny />);
|
||||
await screen.findByTestId('stack-trace');
|
||||
expect(container.firstChild).toMatchSnapshot();
|
||||
});
|
||||
|
||||
it('should render with props, but without stack', async () => {
|
||||
const { container } = render(
|
||||
<StackTraceTabAsAny actions={actions} action={actions[0].action} />
|
||||
<TraceTabAsAny actions={actions} action={actions[0].action} />
|
||||
);
|
||||
await screen.findByTestId('stack-trace');
|
||||
expect(container.firstChild).toMatchSnapshot();
|
||||
|
@ -33,14 +33,14 @@ describe('StackTraceTab component', () => {
|
|||
|
||||
it('should render the link to docs', () => {
|
||||
const { container } = render(
|
||||
<StackTraceTabAsAny actions={actions} action={actions[1].action} />
|
||||
<TraceTabAsAny actions={actions} action={actions[1].action} />
|
||||
);
|
||||
expect(container.firstChild).toMatchSnapshot();
|
||||
});
|
||||
|
||||
it('should render with trace stack', async () => {
|
||||
const { container } = render(
|
||||
<StackTraceTabAsAny actions={actions} action={actions[2].action} />
|
||||
<TraceTabAsAny actions={actions} action={actions[2].action} />
|
||||
);
|
||||
await screen.findByTestId('stack-trace');
|
||||
expect(container.firstChild).toMatchSnapshot();
|
||||
|
|
|
@ -53,6 +53,7 @@
|
|||
"@rollup/plugin-babel": "^5.3.0",
|
||||
"@types/jest": "^27.4.0",
|
||||
"@types/lodash": "^4.14.178",
|
||||
"@types/node": "^16.11.17",
|
||||
"@types/react": "^17.0.38",
|
||||
"@types/react-redux": "^7.1.21",
|
||||
"@typescript-eslint/eslint-plugin": "^5.8.1",
|
||||
|
|
Loading…
Reference in New Issue
Block a user