@shopgate/pwa-ui-material 7.31.5 → 7.31.6

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,11 +1,11 @@
1
1
  {
2
2
  "name": "@shopgate/pwa-ui-material",
3
- "version": "7.31.5",
3
+ "version": "7.31.6",
4
4
  "description": "Shopgate's material design UI components.",
5
5
  "main": "index.js",
6
6
  "license": "Apache-2.0",
7
7
  "devDependencies": {
8
- "@shopgate/pwa-common": "7.31.5",
8
+ "@shopgate/pwa-common": "7.31.6",
9
9
  "@types/color": "^4.2.0",
10
10
  "@types/react-transition-group": "^4.4.12",
11
11
  "react": "^17.0.2",
@@ -1,37 +0,0 @@
1
- import React from 'react';
2
- import { mount } from 'enzyme';
3
- import AccordionContent from "./index";
4
- import { jsx as _jsx } from "react/jsx-runtime";
5
- jest.mock('react-spring', () => ({
6
- ...jest.requireActual('react-spring'),
7
- useSpring: jest.fn().mockReturnValue({
8
- hook: 'useSpring return value'
9
- })
10
- }));
11
- describe('<AccordionContent />', () => {
12
- it('should render as closed', () => {
13
- const wrapper = mount(/*#__PURE__*/_jsx(AccordionContent, {
14
- id: "some-id",
15
- children: /*#__PURE__*/_jsx("div", {
16
- id: "test",
17
- children: "Some Child"
18
- })
19
- }));
20
- expect(wrapper.find('#test').text()).toEqual('Some Child');
21
- expect(wrapper.find('div').get(0).props['aria-hidden']).toEqual(true);
22
- expect(wrapper).toMatchSnapshot();
23
- });
24
- it('should render as open', () => {
25
- const wrapper = mount(/*#__PURE__*/_jsx(AccordionContent, {
26
- open: true,
27
- id: "some-id",
28
- children: /*#__PURE__*/_jsx("div", {
29
- id: "test",
30
- children: "Some Child"
31
- })
32
- }));
33
- expect(wrapper.find('#test').text()).toEqual('Some Child');
34
- expect(wrapper.find('div').get(0).props['aria-hidden']).toEqual(false);
35
- expect(wrapper).toMatchSnapshot();
36
- });
37
- });
package/Accordion/spec.js DELETED
@@ -1,41 +0,0 @@
1
- import React from 'react';
2
- import { mount } from 'enzyme';
3
- import Accordion from "./index";
4
- import { jsx as _jsx } from "react/jsx-runtime";
5
- jest.unmock('@shopgate/pwa-ui-shared');
6
- jest.mock('@shopgate/engage/components');
7
- jest.mock('react-spring', () => ({
8
- ...jest.requireActual('react-spring'),
9
- useSpring: jest.fn().mockReturnValue({
10
- hook: 'useSpring return value'
11
- })
12
- }));
13
- describe('<Accordion />', () => {
14
- beforeEach(() => {
15
- jest.clearAllMocks();
16
- });
17
- it('should render with renderLabel prop and children', () => {
18
- const wrapper = mount(/*#__PURE__*/_jsx(Accordion, {
19
- renderLabel: () => /*#__PURE__*/_jsx("div", {}),
20
- testId: "Some Thing",
21
- children: "Some content."
22
- }));
23
- expect(wrapper).toMatchSnapshot();
24
- expect(wrapper.find('AccordionContent').exists()).toBe(true);
25
- });
26
- it('should not render without a renderLabel prop', () => {
27
- const wrapper = mount(/*#__PURE__*/_jsx(Accordion, {
28
- testId: "Some Thing"
29
- }));
30
- expect(wrapper).toMatchSnapshot();
31
- expect(wrapper.instance()).toEqual(null);
32
- });
33
- it('should not render without children', () => {
34
- const wrapper = mount(/*#__PURE__*/_jsx(Accordion, {
35
- renderLabel: () => {},
36
- testId: "Some Thing"
37
- }));
38
- expect(wrapper).toMatchSnapshot();
39
- expect(wrapper.instance()).toEqual(null);
40
- });
41
- });
@@ -1,29 +0,0 @@
1
- import React from 'react';
2
- import { shallow } from 'enzyme';
3
- import Button from '@shopgate/pwa-ui-shared/Button';
4
- import Buttons from "./index";
5
- import { jsx as _jsx } from "react/jsx-runtime";
6
- const actions = [{
7
- label: 'action0',
8
- action: jest.fn()
9
- }, {
10
- label: 'action1',
11
- action: jest.fn()
12
- }, {
13
- label: 'action2',
14
- action: jest.fn()
15
- }];
16
- describe('<Buttons />', () => {
17
- it('should not render if no actions are passed', () => {
18
- const wrapper = shallow(/*#__PURE__*/_jsx(Buttons, {}));
19
- expect(wrapper).toMatchSnapshot();
20
- expect(wrapper.instance()).toEqual(null);
21
- });
22
- it('should render buttons', () => {
23
- const wrapper = shallow(/*#__PURE__*/_jsx(Buttons, {
24
- actions: actions
25
- }));
26
- expect(wrapper).toMatchSnapshot();
27
- expect(wrapper.find(Button).length).toBe(actions.length);
28
- });
29
- });
@@ -1,18 +0,0 @@
1
- import React from 'react';
2
- import { shallow } from 'enzyme';
3
- import Content from "./index";
4
- import { jsx as _jsx } from "react/jsx-runtime";
5
- describe('<Content />', () => {
6
- it('should not render if no content is passed', () => {
7
- const wrapper = shallow(/*#__PURE__*/_jsx(Content, {}));
8
- expect(wrapper).toMatchSnapshot();
9
- expect(wrapper.instance()).toEqual(null);
10
- });
11
- it('should render content components', () => {
12
- const wrapper = shallow(/*#__PURE__*/_jsx(Content, {
13
- content: "Hello World"
14
- }));
15
- expect(wrapper).toMatchSnapshot();
16
- expect(wrapper.find('[id="basicDialogDesc"]').length).toBe(1);
17
- });
18
- });
@@ -1,18 +0,0 @@
1
- import React from 'react';
2
- import { shallow } from 'enzyme';
3
- import Title from "./index";
4
- import { jsx as _jsx } from "react/jsx-runtime";
5
- describe('<Title />', () => {
6
- it('should not render without a title', () => {
7
- const wrapper = shallow(/*#__PURE__*/_jsx(Title, {}));
8
- expect(wrapper).toMatchSnapshot();
9
- expect(wrapper.instance()).toEqual(null);
10
- });
11
- it('should render with a title', () => {
12
- const wrapper = shallow(/*#__PURE__*/_jsx(Title, {
13
- title: "Some test title"
14
- }));
15
- expect(wrapper).toMatchSnapshot();
16
- expect(wrapper.find('[id="basicDialogTitle"]').length).toBe(1);
17
- });
18
- });
@@ -1,44 +0,0 @@
1
- import React from 'react';
2
- import { shallow } from 'enzyme';
3
- import Title from "./components/Title";
4
- import Content from "./components/Content";
5
- import Buttons from "./components/Buttons";
6
- import BasicDialog from "./index";
7
- import { jsx as _jsx } from "react/jsx-runtime";
8
- const props = {
9
- title: 'Hello World',
10
- children: /*#__PURE__*/_jsx("div", {
11
- children: "Hello World"
12
- }),
13
- actions: [{
14
- label: 'action0',
15
- action: jest.fn()
16
- }, {
17
- label: 'action1',
18
- action: jest.fn()
19
- }, {
20
- label: 'action2',
21
- action: jest.fn()
22
- }]
23
- };
24
- jest.mock('@shopgate/engage/a11y/components');
25
- describe('<BasicDialog />', () => {
26
- it('should render with minimal props', () => {
27
- const wrapper = shallow(/*#__PURE__*/_jsx(BasicDialog, {
28
- actions: []
29
- }));
30
- expect(wrapper).toMatchSnapshot();
31
- });
32
- it('should render as expected', () => {
33
- const wrapper = shallow(/*#__PURE__*/_jsx(BasicDialog, {
34
- ...props
35
- }));
36
- expect(wrapper).toMatchSnapshot();
37
- expect(wrapper.find(Title).length).toBe(1);
38
- expect(wrapper.find(Title).props().title).toEqual(props.title);
39
- expect(wrapper.find(Content).length).toBe(1);
40
- expect(wrapper.find(Content).props().content).toEqual(props.children);
41
- expect(wrapper.find(Buttons).length).toBe(1);
42
- expect(wrapper.find(Buttons).props().actions).toEqual(props.actions);
43
- });
44
- });
@@ -1,10 +0,0 @@
1
- import React from 'react';
2
- import { mount } from 'enzyme';
3
- import Divider from "./index";
4
- import { jsx as _jsx } from "react/jsx-runtime";
5
- describe('<NavDrawerDivider />', () => {
6
- it('should match the snapshot', () => {
7
- const wrapper = mount(/*#__PURE__*/_jsx(Divider, {}));
8
- expect(wrapper).toMatchSnapshot();
9
- });
10
- });
package/NavDrawer/spec.js DELETED
@@ -1,139 +0,0 @@
1
- import "core-js/modules/es.array.reduce.js";
2
- /* eslint-disable global-require, extra-rules/no-single-line-objects */
3
- import React from 'react';
4
- import { shallow, mount } from 'enzyme';
5
- import { act } from 'react-dom/test-utils';
6
- import Transition from 'react-transition-group/Transition';
7
- jest.unmock('@shopgate/pwa-core');
8
- jest.mock('@shopgate/engage/styles', () => ({
9
- makeStyles: () => function mockUseStylesFactory(defs) {
10
- return function useStylesMock() {
11
- const keys = Object.keys(defs);
12
- const classes = keys.reduce((acc, key) => {
13
- acc[key] = `mock-class-${key}`;
14
- return acc;
15
- }, {});
16
- const cx = (...parts) => parts.filter(Boolean).join(' ');
17
- return {
18
- classes,
19
- cx
20
- };
21
- };
22
- }
23
- }));
24
- jest.mock('@shopgate/engage/components', () => {
25
- const mockReact = require('react');
26
- const mockPropTypes = require('prop-types');
27
- function Backdrop(props) {
28
- const {
29
- isVisible,
30
- onClick
31
- } = props;
32
- if (!isVisible) {
33
- return null;
34
- }
35
- return mockReact.createElement('button', {
36
- type: 'button',
37
- 'aria-label': 'Close',
38
- 'data-test-id': 'NavDrawerBackdrop',
39
- onClick
40
- });
41
- }
42
- Backdrop.propTypes = {
43
- isVisible: mockPropTypes.bool,
44
- onClick: mockPropTypes.func
45
- };
46
- Backdrop.defaultProps = {
47
- isVisible: false,
48
- onClick: undefined
49
- };
50
- Backdrop.displayName = 'Backdrop';
51
- return {
52
- Backdrop
53
- };
54
- });
55
- jest.mock('@shopgate/engage/a11y/components', () => {
56
- const mockPropTypes = require('prop-types');
57
- function ModalStateTracker(props) {
58
- return props.children;
59
- }
60
- ModalStateTracker.propTypes = {
61
- children: mockPropTypes.node
62
- };
63
- ModalStateTracker.defaultProps = {
64
- children: null
65
- };
66
- return {
67
- ModalStateTracker
68
- };
69
- });
70
- jest.mock("./components/Item", () => {
71
- const mockReact = require('react');
72
- const mockPropTypes = require('prop-types');
73
- const ItemWithRef = mockReact.forwardRef((props, ref) => mockReact.createElement('button', {
74
- type: 'button',
75
- ref,
76
- 'data-test-id': 'nav-drawer-item'
77
- }, props.label));
78
- ItemWithRef.propTypes = {
79
- label: mockPropTypes.string
80
- };
81
- ItemWithRef.defaultProps = {
82
- label: ''
83
- };
84
- return {
85
- __esModule: true,
86
- default: ItemWithRef
87
- };
88
- });
89
-
90
- // eslint-disable-next-line import/first
91
- import NavDrawer from "./index";
92
- import { jsx as _jsx } from "react/jsx-runtime";
93
- describe('NavDrawer', () => {
94
- it('should match the snapshot', () => {
95
- const wrapper = shallow(/*#__PURE__*/_jsx(NavDrawer, {
96
- children: "Content"
97
- }));
98
- expect(wrapper).toMatchSnapshot();
99
- });
100
- it('should open and close with an event', () => {
101
- const onOpen = jest.fn();
102
- const onClose = jest.fn();
103
- const wrapper = mount(/*#__PURE__*/_jsx(NavDrawer, {
104
- onOpen: onOpen,
105
- onClose: onClose,
106
- children: "Content"
107
- }));
108
- act(() => {
109
- NavDrawer.open();
110
- });
111
- wrapper.update();
112
- expect(wrapper.find(Transition).prop('in')).toEqual(true);
113
- expect(onOpen).toHaveBeenCalled();
114
- expect(onClose).not.toHaveBeenCalled();
115
- act(() => {
116
- NavDrawer.close();
117
- });
118
- wrapper.update();
119
- expect(wrapper.find(Transition).prop('in')).toEqual(false);
120
- expect(onClose).toHaveBeenCalled();
121
- });
122
- it('should close when Backdrop is clicked', () => {
123
- const wrapper = mount(/*#__PURE__*/_jsx(NavDrawer, {
124
- children: "Content"
125
- }));
126
- act(() => {
127
- NavDrawer.open();
128
- });
129
- wrapper.update();
130
- expect(wrapper.find(Transition).prop('in')).toEqual(true);
131
- const backdrop = wrapper.find('[data-test-id="NavDrawerBackdrop"]');
132
- act(() => {
133
- backdrop.simulate('click');
134
- });
135
- wrapper.update();
136
- expect(wrapper.find(Transition).prop('in')).toEqual(false);
137
- });
138
- });
139
- /* eslint-enable global-require, extra-rules/no-single-line-objects */
package/SnackBar/spec.js DELETED
@@ -1,293 +0,0 @@
1
- import React, { useState, useCallback, useEffect } from 'react';
2
- import { render, screen, fireEvent } from '@testing-library/react';
3
- import { act } from 'react-dom/test-utils';
4
- import SnackBar from "./index";
5
-
6
- // Use the real long-press hook (the barrel would otherwise drag in appEvents/pwa-core).
7
- import { jsx as _jsx } from "react/jsx-runtime";
8
- jest.mock('@shopgate/engage/core/hooks/events', () => ({
9
- __esModule: true,
10
- useLongPress: jest.requireActual('@shopgate/engage/core/hooks/events/useLongPress').default
11
- }));
12
- jest.mock('@shopgate/engage/core/helpers', () => ({
13
- i18n: {
14
- text: input => input || ''
15
- }
16
- }));
17
- jest.mock('@shopgate/pwa-common/helpers/config', () => ({
18
- themeColors: {
19
- light: '#ffffff',
20
- lightDark: '#333333',
21
- accent: '#00aaff'
22
- },
23
- themeShadows: {
24
- toast: 'none'
25
- }
26
- }));
27
- jest.mock('@shopgate/pwa-common/components/Ellipsis', () => ({
28
- __esModule: true,
29
- default: ({
30
- children
31
- }) => children
32
- }));
33
- jest.mock('@shopgate/engage/styles', () => ({
34
- makeStyles: () => () => () => ({
35
- classes: new Proxy({}, {
36
- get: (_, prop) => prop
37
- }),
38
- cx: (...args) => args.filter(Boolean).join(' ')
39
- })
40
- }));
41
-
42
- // Render the Spring render-prop child immediately without animating. onRest is fired on a 0ms
43
- // timer to mirror react-spring calling it after the commit — this drives the auto-hide countdown.
44
- jest.mock('react-spring', () => ({
45
- config: {
46
- stiff: {}
47
- }
48
- }));
49
- jest.mock('react-spring/renderprops.cjs', () => {
50
- // eslint-disable-next-line global-require
51
- const {
52
- useEffect: useSpringEffect
53
- } = require('react');
54
- return {
55
- Spring: ({
56
- children,
57
- onRest
58
- }) => {
59
- useSpringEffect(() => {
60
- const id = setTimeout(() => onRest && onRest(), 0);
61
- return () => clearTimeout(id);
62
- });
63
- return children({});
64
- }
65
- };
66
- });
67
- describe('<SnackBar />', () => {
68
- beforeEach(() => {
69
- jest.useFakeTimers();
70
- });
71
- afterEach(() => {
72
- jest.clearAllTimers();
73
- jest.useRealTimers();
74
- });
75
- it('should invoke onLongPress after a long press on a toast that provides one', () => {
76
- const onLongPress = jest.fn();
77
- const toasts = [{
78
- id: 'pipeline.error',
79
- message: 'error.general',
80
- onLongPress,
81
- duration: 5000
82
- }];
83
- render(/*#__PURE__*/_jsx(SnackBar, {
84
- removeToast: jest.fn(),
85
- toasts: toasts
86
- }));
87
- const message = screen.getByText('error.general');
88
- fireEvent.mouseDown(message);
89
- act(() => {
90
- jest.advanceTimersByTime(4000);
91
- });
92
- fireEvent.mouseUp(message);
93
- expect(onLongPress).toHaveBeenCalledTimes(1);
94
- });
95
- it('should keep the toast open while it is being long-pressed instead of auto-hiding', () => {
96
- const onLongPress = jest.fn();
97
- const removeToast = jest.fn();
98
- const toasts = [{
99
- id: 'pipeline.error',
100
- message: 'error.general',
101
- onLongPress,
102
- duration: 2500
103
- }];
104
- render(/*#__PURE__*/_jsx(SnackBar, {
105
- removeToast: removeToast,
106
- toasts: toasts
107
- }));
108
- const message = screen.getByText('error.general');
109
- fireEvent.mouseDown(message);
110
-
111
- // Hold well past the toast's 2500ms lifetime: the auto-hide countdown must be frozen, so the
112
- // toast neither hides nor gets removed while the press is ongoing.
113
- act(() => {
114
- jest.advanceTimersByTime(3000);
115
- });
116
- expect(onLongPress).not.toHaveBeenCalled();
117
- expect(removeToast).not.toHaveBeenCalled();
118
-
119
- // The long press still completes at its 4000ms threshold.
120
- act(() => {
121
- jest.advanceTimersByTime(1000);
122
- });
123
- expect(onLongPress).toHaveBeenCalledTimes(1);
124
- });
125
- it('should invoke the pressed toast\'s handler even if the toast is mutated in place mid-press', () => {
126
- // ToastProvider updates a same-id toast by mutating it in place, so the long-press must fire
127
- // the handler captured when the press started, not whatever toasts[0].onLongPress became.
128
- const pressedHandler = jest.fn();
129
- const replacementHandler = jest.fn();
130
- const toasts = [{
131
- id: 'pipeline.error',
132
- message: 'error.general',
133
- onLongPress: pressedHandler,
134
- duration: 5000
135
- }];
136
- render(/*#__PURE__*/_jsx(SnackBar, {
137
- removeToast: jest.fn(),
138
- toasts: toasts
139
- }));
140
- const message = screen.getByText('error.general');
141
- fireEvent.mouseDown(message);
142
- // A second pipeline error arrives during the press and overwrites the toast's handler in place.
143
- toasts[0].onLongPress = replacementHandler;
144
- act(() => {
145
- jest.advanceTimersByTime(4000);
146
- });
147
- fireEvent.mouseUp(message);
148
- expect(pressedHandler).toHaveBeenCalledTimes(1);
149
- expect(replacementHandler).not.toHaveBeenCalled();
150
- });
151
- it('should not also fire the box click action on a long press when onLongPress is present', () => {
152
- const onLongPress = jest.fn();
153
- const action = jest.fn();
154
- const toasts = [{
155
- id: 'pipeline.error',
156
- message: 'error.general',
157
- onLongPress,
158
- action,
159
- // no actionLabel → would otherwise become a whole-box onClick
160
- duration: 5000
161
- }];
162
- render(/*#__PURE__*/_jsx(SnackBar, {
163
- removeToast: jest.fn(),
164
- toasts: toasts
165
- }));
166
- const message = screen.getByText('error.general');
167
- fireEvent.mouseDown(message);
168
- act(() => {
169
- jest.advanceTimersByTime(4000);
170
- });
171
- fireEvent.mouseUp(message);
172
- // The pointer release also produces a click, which must not run the action too.
173
- fireEvent.click(message);
174
- expect(onLongPress).toHaveBeenCalledTimes(1);
175
- expect(action).not.toHaveBeenCalled();
176
- });
177
- it('should not invoke onLongPress when the press is released before the threshold', () => {
178
- const onLongPress = jest.fn();
179
- const toasts = [{
180
- id: 'pipeline.error',
181
- message: 'error.general',
182
- onLongPress,
183
- duration: 5000
184
- }];
185
- render(/*#__PURE__*/_jsx(SnackBar, {
186
- removeToast: jest.fn(),
187
- toasts: toasts
188
- }));
189
- const message = screen.getByText('error.general');
190
- fireEvent.mouseDown(message);
191
- act(() => {
192
- jest.advanceTimersByTime(300);
193
- });
194
- fireEvent.mouseUp(message);
195
- act(() => {
196
- jest.advanceTimersByTime(500);
197
- });
198
- expect(onLongPress).not.toHaveBeenCalled();
199
- });
200
- it('should not attach long-press handlers when the toast has no onLongPress', () => {
201
- const toasts = [{
202
- id: 'pipeline.error',
203
- message: 'error.general',
204
- duration: 5000
205
- }];
206
- render(/*#__PURE__*/_jsx(SnackBar, {
207
- removeToast: jest.fn(),
208
- toasts: toasts
209
- }));
210
-
211
- // A long press must be a no-op (and must not throw) when no handler is provided.
212
- const message = screen.getByText('error.general');
213
- fireEvent.mouseDown(message);
214
- expect(() => act(() => {
215
- jest.advanceTimersByTime(500);
216
- })).not.toThrow();
217
- });
218
- it('should play each queued toast in turn — the second is not skipped or instantly removed', () => {
219
- // Mirrors ToastProvider: a FIFO queue whose head is dropped (immutably) on removeToast.
220
- const Harness = () => {
221
- const [toasts, setToasts] = useState([{
222
- id: 'a',
223
- message: 'first.toast',
224
- duration: 2500
225
- }, {
226
- id: 'b',
227
- message: 'second.toast',
228
- duration: 2500
229
- }]);
230
- const removeToast = useCallback(() => setToasts(t => t.slice(1)), []);
231
- if (!toasts.length) return null;
232
- return /*#__PURE__*/_jsx(SnackBar, {
233
- removeToast: removeToast,
234
- toasts: toasts
235
- });
236
- };
237
- render(/*#__PURE__*/_jsx(Harness, {}));
238
-
239
- // First toast is shown; the second is still queued, not yet rendered.
240
- expect(screen.getByText('first.toast')).toBeTruthy();
241
- expect(screen.queryByText('second.toast')).toBe(null);
242
-
243
- // First toast dwells (2500ms), then slides out and is removed after the exit animation.
244
- act(() => {
245
- jest.advanceTimersByTime(2500 + 600);
246
- });
247
-
248
- // The second toast is now on screen — it got its turn rather than being dropped instantly.
249
- expect(screen.getByText('second.toast')).toBeTruthy();
250
- expect(screen.queryByText('first.toast')).toBe(null);
251
-
252
- // It in turn dwells and is removed, draining the queue.
253
- act(() => {
254
- jest.advanceTimersByTime(2500 + 600);
255
- });
256
- expect(screen.queryByText('second.toast')).toBe(null);
257
- });
258
- it('auto-hides within its duration even when the parent re-renders repeatedly', () => {
259
- // The spring re-settles (and fires onRest) on every render because of `force`. The auto-hide
260
- // countdown must therefore NOT be tied to onRest, or frequent parent re-renders would keep
261
- // resetting it and the toast would outlive its duration.
262
- const removeToast = jest.fn();
263
- const Harness = () => {
264
- const [, tick] = useState(0);
265
- useEffect(() => {
266
- const id = setInterval(() => tick(n => n + 1), 500); // re-render every 500ms (< duration)
267
- return () => clearInterval(id);
268
- }, []);
269
- const toasts = [{
270
- id: 'a',
271
- message: 'error.general',
272
- duration: 2500
273
- }];
274
- return /*#__PURE__*/_jsx(SnackBar, {
275
- removeToast: removeToast,
276
- toasts: toasts
277
- });
278
- };
279
- render(/*#__PURE__*/_jsx(Harness, {}));
280
-
281
- // Not yet gone before its duration elapses.
282
- act(() => {
283
- jest.advanceTimersByTime(2000);
284
- });
285
- expect(removeToast).not.toHaveBeenCalled();
286
-
287
- // Removed shortly after its duration (dwell + exit animation), despite the periodic re-renders.
288
- act(() => {
289
- jest.advanceTimersByTime(500 + 600);
290
- });
291
- expect(removeToast).toHaveBeenCalledTimes(1);
292
- });
293
- });
@@ -1,16 +0,0 @@
1
- {
2
- "extends": "@shopgate/engage/tsconfig.build.json",
3
- "compilerOptions": {
4
- "outDir": "./dist",
5
- "rootDir": "."
6
- },
7
- "include": ["**/*.ts", "**/*.tsx"],
8
- "exclude": [
9
- "dist",
10
- "node_modules",
11
- "**/*.spec.*",
12
- "**/__tests__/**",
13
- "**/__snapshots__/**",
14
- "coverage"
15
- ]
16
- }
package/tsconfig.json DELETED
@@ -1,3 +0,0 @@
1
- {
2
- "extends": "@shopgate/engage/tsconfig.json",
3
- }