@pie-lib/editable-html 13.1.0-beta.1 → 13.1.0-beta.3

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.
Files changed (59) hide show
  1. package/lib/editor.js +1 -1
  2. package/package.json +3 -3
  3. package/lib/__tests__/editor-utils.test.js +0 -164
  4. package/lib/__tests__/editor-utils.test.js.map +0 -1
  5. package/lib/__tests__/serialization.test.js +0 -241
  6. package/lib/__tests__/serialization.test.js.map +0 -1
  7. package/lib/__tests__/utils.js +0 -79
  8. package/lib/__tests__/utils.js.map +0 -1
  9. package/lib/plugins/image/__tests__/component.test.js +0 -96
  10. package/lib/plugins/image/__tests__/component.test.js.map +0 -1
  11. package/lib/plugins/image/__tests__/image-toolbar-logic.test.js +0 -131
  12. package/lib/plugins/image/__tests__/image-toolbar-logic.test.js.map +0 -1
  13. package/lib/plugins/image/__tests__/image-toolbar.test.js +0 -21
  14. package/lib/plugins/image/__tests__/image-toolbar.test.js.map +0 -1
  15. package/lib/plugins/image/__tests__/index.test.js +0 -86
  16. package/lib/plugins/image/__tests__/index.test.js.map +0 -1
  17. package/lib/plugins/image/__tests__/insert-image-handler.test.js +0 -112
  18. package/lib/plugins/image/__tests__/insert-image-handler.test.js.map +0 -1
  19. package/lib/plugins/image/__tests__/mock-change.js +0 -22
  20. package/lib/plugins/image/__tests__/mock-change.js.map +0 -1
  21. package/lib/plugins/list/__tests__/index.test.js +0 -63
  22. package/lib/plugins/list/__tests__/index.test.js.map +0 -1
  23. package/lib/plugins/math/__tests__/index.test.js +0 -284
  24. package/lib/plugins/math/__tests__/index.test.js.map +0 -1
  25. package/lib/plugins/media/__tests__/index.test.js +0 -69
  26. package/lib/plugins/media/__tests__/index.test.js.map +0 -1
  27. package/lib/plugins/respArea/drag-in-the-blank/__tests__/choice.test.js +0 -93
  28. package/lib/plugins/respArea/drag-in-the-blank/__tests__/choice.test.js.map +0 -1
  29. package/lib/plugins/table/__tests__/index.test.js +0 -416
  30. package/lib/plugins/table/__tests__/index.test.js.map +0 -1
  31. package/lib/plugins/table/__tests__/table-toolbar.test.js +0 -81
  32. package/lib/plugins/table/__tests__/table-toolbar.test.js.map +0 -1
  33. package/lib/plugins/toolbar/__tests__/default-toolbar.test.js +0 -153
  34. package/lib/plugins/toolbar/__tests__/default-toolbar.test.js.map +0 -1
  35. package/lib/plugins/toolbar/__tests__/editor-and-toolbar.test.js +0 -47
  36. package/lib/plugins/toolbar/__tests__/editor-and-toolbar.test.js.map +0 -1
  37. package/lib/plugins/toolbar/__tests__/toolbar-buttons.test.js +0 -112
  38. package/lib/plugins/toolbar/__tests__/toolbar-buttons.test.js.map +0 -1
  39. package/lib/plugins/toolbar/__tests__/toolbar.test.js +0 -118
  40. package/lib/plugins/toolbar/__tests__/toolbar.test.js.map +0 -1
  41. package/src/__tests__/editor-utils.test.js +0 -162
  42. package/src/__tests__/serialization.test.js +0 -290
  43. package/src/__tests__/utils.js +0 -36
  44. package/src/plugins/image/__tests__/component.test.jsx +0 -73
  45. package/src/plugins/image/__tests__/image-toolbar-logic.test.jsx +0 -90
  46. package/src/plugins/image/__tests__/image-toolbar.test.jsx +0 -12
  47. package/src/plugins/image/__tests__/index.test.js +0 -92
  48. package/src/plugins/image/__tests__/insert-image-handler.test.js +0 -113
  49. package/src/plugins/image/__tests__/mock-change.js +0 -15
  50. package/src/plugins/list/__tests__/index.test.js +0 -52
  51. package/src/plugins/math/__tests__/index.test.jsx +0 -264
  52. package/src/plugins/media/__tests__/index.test.js +0 -75
  53. package/src/plugins/respArea/drag-in-the-blank/__tests__/choice.test.js +0 -71
  54. package/src/plugins/table/__tests__/index.test.jsx +0 -401
  55. package/src/plugins/table/__tests__/table-toolbar.test.jsx +0 -75
  56. package/src/plugins/toolbar/__tests__/default-toolbar.test.jsx +0 -123
  57. package/src/plugins/toolbar/__tests__/editor-and-toolbar.test.jsx +0 -40
  58. package/src/plugins/toolbar/__tests__/toolbar-buttons.test.jsx +0 -97
  59. package/src/plugins/toolbar/__tests__/toolbar.test.jsx +0 -112
@@ -1,290 +0,0 @@
1
- import { htmlToValue, TEXT_RULE } from '../serialization';
2
-
3
- jest.mock('../plugins/math', () => ({
4
- serialization: {
5
- serialize: jest.fn((o, c) => {
6
- return undefined;
7
- }),
8
- deserialize: jest.fn((el, next) => {
9
- return undefined;
10
- }),
11
- },
12
- }));
13
-
14
- describe('TEXT_RULE', () => {
15
- const mkBr = (previousSibling) => {
16
- return {
17
- remove: jest.fn(),
18
- previousSibling,
19
- replaceWith: (foo) => {
20
- previousSibling.textContent = previousSibling.textContent.replace(/(<br>)|(<\/br>)/g, foo);
21
- },
22
- normalize: jest.fn().mockReturnThis(),
23
- tagName: 'br',
24
- };
25
- };
26
-
27
- const mkTextNode = (textContent = '') => ({
28
- nodeName: '#text',
29
- textContent,
30
- normalize: jest.fn().mockReturnThis(),
31
- });
32
-
33
- const mkEl = (querySelectorAllResult) => ({
34
- querySelectorAll: jest.fn().mockReturnValue(querySelectorAllResult),
35
- normalize: jest.fn().mockReturnThis(),
36
- });
37
-
38
- describe('deserialize', () => {
39
- it('if no previous text node, no error is thrown', () => {
40
- const br = mkBr();
41
- const el = mkEl([br]);
42
- expect(() => TEXT_RULE.deserialize(el)).not.toThrow();
43
- });
44
- });
45
- });
46
-
47
- describe('htmlToValue', () => {
48
- it('converts', () => {
49
- const expected = {
50
- object: 'value',
51
- document: {
52
- object: 'document',
53
- data: {},
54
- nodes: [
55
- {
56
- object: 'block',
57
- type: 'div',
58
- isVoid: false,
59
- data: {
60
- attributes: {},
61
- },
62
- nodes: [
63
- {
64
- object: 'block',
65
- type: 'paragraph',
66
- isVoid: false,
67
- data: {
68
- attributes: {},
69
- },
70
- nodes: [
71
- {
72
- object: 'text',
73
- leaves: [
74
- {
75
- object: 'leaf',
76
- text: 'foo',
77
- marks: [],
78
- },
79
- ],
80
- },
81
- {
82
- object: 'inline',
83
- type: 'image',
84
- isVoid: true,
85
- data: {
86
- src: 'blah.jpg',
87
- width: null,
88
- height: null,
89
- margin: '',
90
- justifyContent: '',
91
- alignment: null,
92
- alt: null,
93
- },
94
- nodes: [
95
- {
96
- object: 'text',
97
- leaves: [
98
- {
99
- object: 'leaf',
100
- text: '',
101
- marks: [],
102
- },
103
- ],
104
- },
105
- ],
106
- },
107
- {
108
- object: 'text',
109
- leaves: [
110
- {
111
- object: 'leaf',
112
- text: 'bar',
113
- marks: [],
114
- },
115
- ],
116
- },
117
- ],
118
- },
119
- ],
120
- },
121
- ],
122
- },
123
- };
124
- const html = `<div><p>foo<img src="blah.jpg"/>bar</p></div>`;
125
- const v = htmlToValue(html);
126
-
127
- expect(v.toJSON()).toEqual(expected);
128
- });
129
-
130
- it('does not break', () => {
131
- /*
132
- More than 12 iterations of the same kind would previously break the input. Here we have 16 text nodes, and now it works.
133
- */
134
- const expected = {
135
- object: 'value',
136
- document: {
137
- object: 'document',
138
- data: {},
139
- nodes: [
140
- {
141
- object: 'block',
142
- type: 'div',
143
- isVoid: false,
144
- data: { attributes: {} },
145
- nodes: [
146
- {
147
- object: 'text',
148
- leaves: [
149
- {
150
- object: 'leaf',
151
- text: 'Foo ',
152
- marks: [],
153
- },
154
- {
155
- object: 'leaf',
156
- text: 'x',
157
- marks: [
158
- {
159
- object: 'mark',
160
- type: 'italic',
161
- data: {},
162
- },
163
- ],
164
- },
165
- {
166
- object: 'leaf',
167
- text: ' bar ',
168
- marks: [],
169
- },
170
- {
171
- object: 'leaf',
172
- text: 'x',
173
- marks: [
174
- {
175
- object: 'mark',
176
- type: 'italic',
177
- data: {},
178
- },
179
- ],
180
- },
181
- {
182
- object: 'leaf',
183
- text: ' Foo ',
184
- marks: [],
185
- },
186
- {
187
- object: 'leaf',
188
- text: 'x',
189
- marks: [
190
- {
191
- object: 'mark',
192
- type: 'italic',
193
- data: {},
194
- },
195
- ],
196
- },
197
- {
198
- object: 'leaf',
199
- text: ' bar ',
200
- marks: [],
201
- },
202
- {
203
- object: 'leaf',
204
- text: 'x',
205
- marks: [
206
- {
207
- object: 'mark',
208
- type: 'italic',
209
- data: {},
210
- },
211
- ],
212
- },
213
- {
214
- object: 'leaf',
215
- text: ' Foo ',
216
- marks: [],
217
- },
218
- {
219
- object: 'leaf',
220
- text: 'x',
221
- marks: [
222
- {
223
- object: 'mark',
224
- type: 'italic',
225
- data: {},
226
- },
227
- ],
228
- },
229
- {
230
- object: 'leaf',
231
- text: ' bar ',
232
- marks: [],
233
- },
234
- {
235
- object: 'leaf',
236
- text: 'x',
237
- marks: [
238
- {
239
- object: 'mark',
240
- type: 'italic',
241
- data: {},
242
- },
243
- ],
244
- },
245
- {
246
- object: 'leaf',
247
- text: ' Foo ',
248
- marks: [],
249
- },
250
- {
251
- object: 'leaf',
252
- text: 'x',
253
- marks: [
254
- {
255
- object: 'mark',
256
- type: 'italic',
257
- data: {},
258
- },
259
- ],
260
- },
261
- {
262
- object: 'leaf',
263
- text: ' bar ',
264
- marks: [],
265
- },
266
- {
267
- object: 'leaf',
268
- text: 'x',
269
- marks: [
270
- {
271
- object: 'mark',
272
- type: 'italic',
273
- data: {},
274
- },
275
- ],
276
- },
277
- ],
278
- },
279
- ],
280
- },
281
- ],
282
- },
283
- };
284
- const html =
285
- '<div>Foo <em>x</em> bar <em>x</em> Foo <em>x</em> bar <em>x</em> Foo <em>x</em> bar <em>x</em> Foo <em>x</em> bar <em>x</em></div>';
286
- const v = htmlToValue(html);
287
-
288
- expect(v.toJSON()).toEqual(expected);
289
- });
290
- });
@@ -1,36 +0,0 @@
1
- import React from 'react';
2
-
3
- export function classObject() {
4
- const out = {};
5
- for (var a in arguments) {
6
- const value = arguments[a];
7
- out[value] = value;
8
- }
9
- return out;
10
- }
11
-
12
- export function mockComponents() {
13
- const out = {};
14
- for (var a in arguments) {
15
- const value = arguments[a];
16
- out[value] = class extends React.Component {
17
- render() {
18
- return <div data-mock-component="true">{value}</div>;
19
- }
20
- };
21
- }
22
- return out;
23
- }
24
-
25
- export function mockIconButton() {
26
- jest.mock('@mui/material/IconButton', () => {
27
- return (props) => <div className={props.className} style={props.style} ariaLabel={props['aria-label']} />;
28
- });
29
- }
30
- export function mockMathInput() {
31
- jest.mock('@pie-lib/math-input-mathlive', () => ({
32
- addBrackets: jest.fn((s) => s),
33
- removeBrackets: jest.fn((s) => s),
34
- ...mockComponents('Keypad', 'MathQuillInput', 'EditableMathInput', 'HorizontalKeypad'),
35
- }));
36
- }
@@ -1,73 +0,0 @@
1
- import React from 'react';
2
- import { render } from '@testing-library/react';
3
- import { Block, Data } from 'slate';
4
- import { Component } from '../component';
5
-
6
- describe('Image Component', () => {
7
- const createImageNode = (dataProps = {}) => {
8
- return Block.fromJSON({
9
- type: 'image',
10
- data: Data.create({
11
- width: 50,
12
- height: 50,
13
- src: 'test-image.jpg',
14
- ...dataProps,
15
- }),
16
- });
17
- };
18
-
19
- const createMockEditor = () => ({
20
- value: {},
21
- change: jest.fn(),
22
- });
23
-
24
- const defaultClasses = {
25
- active: 'active',
26
- loading: 'loading',
27
- pendingDelete: 'pendingDelete',
28
- };
29
-
30
- const defaultProps = {
31
- node: createImageNode(),
32
- editor: createMockEditor(),
33
- classes: defaultClasses,
34
- onDelete: jest.fn(),
35
- };
36
-
37
- it('renders correctly with default props', () => {
38
- const { container } = render(<Component {...defaultProps} />);
39
- expect(container.firstChild).toBeInTheDocument();
40
- });
41
-
42
- it('renders image with correct dimensions', () => {
43
- const { container } = render(<Component {...defaultProps} />);
44
- const img = container.querySelector('img');
45
- expect(img).toBeInTheDocument();
46
- });
47
-
48
- it('renders with custom width and height', () => {
49
- const node = createImageNode({ width: 100, height: 200 });
50
- const { container } = render(<Component {...defaultProps} node={node} />);
51
- const img = container.querySelector('img');
52
- expect(img).toBeInTheDocument();
53
- });
54
-
55
- it('renders with loading class when loading', () => {
56
- const node = createImageNode({ loading: true });
57
- const { container } = render(<Component {...defaultProps} node={node} />);
58
- expect(container.firstChild).toBeInTheDocument();
59
- });
60
-
61
- it('renders with active class when active', () => {
62
- const node = createImageNode({ active: true });
63
- const { container } = render(<Component {...defaultProps} node={node} />);
64
- expect(container.firstChild).toBeInTheDocument();
65
- });
66
-
67
- it('handles image with source', () => {
68
- const node = createImageNode({ src: 'test-image.jpg' });
69
- const { container } = render(<Component {...defaultProps} node={node} />);
70
- const img = container.querySelector('img');
71
- expect(img).toHaveAttribute('src', 'test-image.jpg');
72
- });
73
- });
@@ -1,90 +0,0 @@
1
- import { render, screen } from '@testing-library/react';
2
- import userEvent from '@testing-library/user-event';
3
- import { ImageToolbar } from '../image-toolbar';
4
- import React from 'react';
5
-
6
- // Mock the alt-dialog component to avoid complex modal rendering in tests
7
- jest.mock('../alt-dialog', () => {
8
- return function AltDialog({ alt, onDone }) {
9
- return (
10
- <div data-testid="alt-dialog">
11
- <input data-testid="alt-input" defaultValue={alt} onChange={(e) => onDone(e.target.value)} />
12
- </div>
13
- );
14
- };
15
- });
16
-
17
- describe('ImageToolbar', () => {
18
- let onChange;
19
-
20
- beforeEach(() => {
21
- onChange = jest.fn();
22
- });
23
-
24
- const renderComponent = (extras = {}) => {
25
- const props = {
26
- onChange,
27
- imageLoaded: true,
28
- ...extras,
29
- };
30
-
31
- return render(<ImageToolbar {...props} />);
32
- };
33
-
34
- describe('rendering', () => {
35
- it('renders alignment buttons', () => {
36
- renderComponent();
37
- expect(screen.getByText('left')).toBeInTheDocument();
38
- expect(screen.getByText('center')).toBeInTheDocument();
39
- expect(screen.getByText('right')).toBeInTheDocument();
40
- });
41
-
42
- it('renders alt text button', () => {
43
- renderComponent();
44
- expect(screen.getByText('Alt text')).toBeInTheDocument();
45
- });
46
-
47
- it('does not render alignment buttons when disabled', () => {
48
- renderComponent({ disableImageAlignmentButtons: true });
49
- expect(screen.queryByText('left')).not.toBeInTheDocument();
50
- expect(screen.queryByText('center')).not.toBeInTheDocument();
51
- expect(screen.queryByText('right')).not.toBeInTheDocument();
52
- });
53
-
54
- it('shows active state for selected alignment', () => {
55
- const { container } = renderComponent({ alignment: 'center' });
56
- // The MarkButton component uses aria-pressed for active state
57
- const centerButton = screen.getByText('center').closest('button');
58
- expect(centerButton).toHaveAttribute('aria-pressed', 'true');
59
- });
60
- });
61
-
62
- describe('user interactions', () => {
63
- it('calls onChange with alignment when left is clicked', async () => {
64
- const user = userEvent.setup();
65
- renderComponent();
66
-
67
- await user.click(screen.getByText('left'));
68
-
69
- expect(onChange).toHaveBeenCalledWith({ alignment: 'left' });
70
- });
71
-
72
- it('calls onChange with alignment when center is clicked', async () => {
73
- const user = userEvent.setup();
74
- renderComponent();
75
-
76
- await user.click(screen.getByText('center'));
77
-
78
- expect(onChange).toHaveBeenCalledWith({ alignment: 'center' });
79
- });
80
-
81
- it('calls onChange with alignment when right is clicked', async () => {
82
- const user = userEvent.setup();
83
- renderComponent();
84
-
85
- await user.click(screen.getByText('right'));
86
-
87
- expect(onChange).toHaveBeenCalledWith({ alignment: 'right' });
88
- });
89
- });
90
- });
@@ -1,12 +0,0 @@
1
- import React from 'react';
2
- import Toolbar from '../image-toolbar';
3
- import { render } from '@testing-library/react';
4
-
5
- it('renders image toolbar', () => {
6
- const classes = { holder: 'holder' };
7
-
8
- const { container } = render(<Toolbar percent={50} classes={classes} onChange={jest.fn()} />);
9
-
10
- // Verify the toolbar is rendered
11
- expect(container.firstChild).toBeInTheDocument();
12
- });
@@ -1,92 +0,0 @@
1
- import ImageToolbar from '../';
2
-
3
- describe('image plugin', () => {
4
- let value = {};
5
-
6
- const imageSupport = {
7
- delete: jest.fn(),
8
- add: jest.fn(),
9
- };
10
-
11
- const imagePlugin = ImageToolbar({
12
- onDelete: (src, done) => {
13
- imageSupport.delete(src, (e) => {
14
- done(e, value);
15
- });
16
- },
17
- insertImageRequested: (node, getHandler) => {
18
- const handler = getHandler(() => value);
19
- imageSupport.add(handler);
20
- },
21
- });
22
-
23
- describe('normalizeNode', () => {
24
- it('should exit the function if the node is not of type document', () => {
25
- const returnValue = imagePlugin.normalizeNode({ object: 'image' });
26
-
27
- expect(returnValue).toEqual(undefined);
28
- });
29
-
30
- it('should exit if the function if there are no changes needed', () => {
31
- const nodes = [
32
- {
33
- object: 'text',
34
- text: 'Before Image',
35
- },
36
- {
37
- type: 'image',
38
- },
39
- {
40
- object: 'text',
41
- text: 'After Image',
42
- },
43
- ];
44
- const returnValue = imagePlugin.normalizeNode({
45
- object: 'document',
46
- findDescendant: jest.fn((callback) => {
47
- nodes.forEach((n) => callback(n));
48
- }),
49
- });
50
- expect(returnValue).toEqual(undefined);
51
- });
52
-
53
- it('should return a function if there is a node with an empty text before an image', () => {
54
- const nodes = [
55
- {
56
- object: 'text',
57
- text: '',
58
- key: '1',
59
- },
60
- {
61
- type: 'image',
62
- key: '2',
63
- },
64
- {
65
- object: 'text',
66
- text: 'After Image',
67
- key: '3',
68
- },
69
- ];
70
- const findDescendant = jest.fn((callback) => {
71
- nodes.forEach((n) => callback(n));
72
- });
73
- const change = {
74
- withoutNormalization: jest.fn((callback) => {
75
- callback();
76
- }),
77
- insertTextByKey: jest.fn(),
78
- };
79
- const returnValue = imagePlugin.normalizeNode({
80
- object: 'document',
81
- findDescendant,
82
- });
83
-
84
- expect(returnValue).toEqual(expect.any(Function));
85
-
86
- returnValue(change);
87
-
88
- expect(change.withoutNormalization).toHaveBeenCalledWith(expect.any(Function));
89
- expect(change.insertTextByKey).toHaveBeenCalledWith('1', 0, ' ');
90
- });
91
- });
92
- });
@@ -1,113 +0,0 @@
1
- import MockChange, { MockDocument } from './mock-change';
2
-
3
- import { Data } from 'slate';
4
- import InsertImageHandler from '../insert-image-handler';
5
-
6
- expect.extend({
7
- toMatchData: (received, argument) => {
8
- const argData = Data.create(argument);
9
- const pass = argData.equals(received.data);
10
- if (pass) {
11
- return {
12
- message: () => `expected ${received.toJSON()} not to be divisible by ${argData.toJSON()}`,
13
- pass: true,
14
- };
15
- } else {
16
- return {
17
- message: () => `expected ${received.toJSON()} to be divisible by ${argData.toJSON()}`,
18
- pass: false,
19
- };
20
- }
21
- },
22
- });
23
- describe('insert image handler', () => {
24
- let change, document, value;
25
- beforeEach(() => {
26
- document = new MockDocument();
27
- change = new MockChange();
28
- value = {
29
- change: () => change,
30
- document,
31
- };
32
- });
33
-
34
- const block = { key: 1 };
35
- const onChange = jest.fn();
36
-
37
- const handler = new InsertImageHandler(
38
- block,
39
- () => {},
40
- () => value,
41
- onChange,
42
- );
43
-
44
- test('it constructs', () => {
45
- expect(handler).not.toEqual(undefined);
46
- });
47
-
48
- describe('fileChosen', () => {
49
- let fileReader;
50
- beforeEach(() => {
51
- fileReader = {
52
- readAsDataURL: jest.fn(),
53
- };
54
-
55
- global.FileReader = () => fileReader;
56
- handler.fileChosen({});
57
- });
58
-
59
- test('calls readAsDataURL', () => {
60
- expect(fileReader.readAsDataURL).toBeCalledWith({});
61
- });
62
-
63
- test('calls onChange with src -> dataUrl', () => {
64
- fileReader.result = 'dataURL';
65
- fileReader.onload();
66
- expect(change.setNodeByKey).toBeCalledWith(block.key, expect.anything());
67
- expect(change.setNodeByKey.mock.calls[0][1]).toMatchData({
68
- src: 'dataURL',
69
- });
70
- expect(onChange).toBeCalledWith(change);
71
- });
72
- });
73
-
74
- describe('progress', () => {
75
- test('calls change w/ percent', () => {
76
- handler.progress(40, 40, 100);
77
- expect(change.setNodeByKey).toBeCalledWith(block.key, expect.anything());
78
-
79
- expect(change.setNodeByKey.mock.calls[0][1].data.toJS()).toMatchObject({
80
- percent: 40,
81
- });
82
- });
83
- });
84
-
85
- describe('done', () => {
86
- test('calls setNodeByKey', () => {
87
- handler.done(null, 'src');
88
-
89
- expect(change.setNodeByKey).toBeCalledWith(block.key, expect.anything());
90
-
91
- expect(change.setNodeByKey.mock.calls[0][1].data.toJS()).toMatchObject({
92
- src: 'src',
93
- loaded: true,
94
- percent: 100,
95
- });
96
- });
97
- });
98
-
99
- describe('cancel', () => {
100
- beforeEach(() => {
101
- document.getChild = jest.fn().mockReturnValue({ data: Data.create({}), key: block.key });
102
- handler.cancel();
103
- });
104
-
105
- test('calls onChange', () => {
106
- expect(onChange).toBeCalled();
107
- });
108
-
109
- test('calls removeNodeByKey', () => {
110
- expect(change.removeNodeByKey).toBeCalledWith(block.key);
111
- });
112
- });
113
- });