@portabletext/editor 2.13.6 → 2.14.0

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.
@@ -1,518 +1,375 @@
1
1
  import {compileSchema, defineSchema} from '@portabletext/schema'
2
+ import {createTestKeyGenerator} from '@portabletext/test'
2
3
  import type {PortableTextBlock} from '@sanity/types'
3
- import {expect, test} from 'vitest'
4
+ import {describe, expect, test} from 'vitest'
4
5
  import {blockOffsetToSpanSelectionPoint} from './util.block-offset'
5
6
 
6
7
  const schema = compileSchema(defineSchema({}))
7
8
 
8
- test(blockOffsetToSpanSelectionPoint.name, () => {
9
- const value: Array<PortableTextBlock> = [
10
- {
11
- _key: 'b1',
12
- _type: 'image',
13
- },
14
- {
15
- _key: 'b2',
16
- _type: 'block',
17
- children: [
18
- {
19
- _key: 's1',
20
- _type: 'span',
21
- text: 'Hello, ',
22
- },
23
- {
24
- _key: 's2',
25
- _type: 'span',
26
- text: 'world!',
27
- marks: ['strong'],
28
- },
29
- ],
30
- },
31
- {
32
- _key: 'b3',
33
- _type: 'block',
34
- children: [
35
- {
36
- _key: 's3',
37
- _type: 'span',
38
- text: 'Here is a ',
39
- },
40
- {
41
- _key: 's4',
42
- _type: 'stock-ticker',
43
- },
44
- {
45
- _key: 's5',
46
- _type: 'span',
47
- text: '.',
48
- },
49
- ],
50
- },
51
- {
52
- _key: 'b4',
53
- _type: 'block',
54
- children: [
55
- {
56
- _key: 's6',
57
- _type: 'stock-ticker',
58
- },
59
- {
60
- _key: 's7',
61
- _type: 'stock-ticker',
62
- },
63
- {
64
- _key: 's8',
65
- _type: 'stock-ticker',
66
- },
67
- ],
68
- },
69
- ]
70
-
71
- expect(
72
- blockOffsetToSpanSelectionPoint({
73
- context: {
74
- schema,
75
- value: [
76
- {
77
- _key: 'b0',
78
- _type: 'block',
79
- children: [
80
- {_key: 's0', _type: 'span', text: 'b'},
81
- {_key: 's1', _type: 'span', text: 'a'},
82
- {_key: 's2', _type: 'span', text: 'r'},
83
- ],
84
- },
9
+ describe(blockOffsetToSpanSelectionPoint.name, () => {
10
+ describe('simple text block ', () => {
11
+ const keyGenerator = createTestKeyGenerator()
12
+ const b0 = keyGenerator()
13
+ const s0 = keyGenerator()
14
+ const s1 = keyGenerator()
15
+ const s2 = keyGenerator()
16
+ const value = [
17
+ {
18
+ _key: b0,
19
+ _type: 'block',
20
+ children: [
21
+ {_key: s0, _type: 'span', text: 'b'},
22
+ {_key: s1, _type: 'span', text: 'a'},
23
+ {_key: s2, _type: 'span', text: 'r'},
85
24
  ],
86
25
  },
87
- blockOffset: {
88
- path: [{_key: 'b0'}],
89
- offset: 3,
90
- },
91
- direction: 'backward',
92
- }),
93
- ).toEqual({
94
- path: [{_key: 'b0'}, 'children', {_key: 's2'}],
95
- offset: 1,
96
- })
97
- expect(
98
- blockOffsetToSpanSelectionPoint({
99
- context: {
100
- schema,
101
- value: [
102
- {
103
- _key: 'b0',
104
- _type: 'block',
105
- children: [
106
- {_key: 's0', _type: 'span', text: 'b'},
107
- {_key: 's1', _type: 'span', text: 'a'},
108
- {_key: 's2', _type: 'span', text: 'r'},
109
- ],
110
- },
111
- ],
112
- },
113
- blockOffset: {
114
- path: [{_key: 'b0'}],
115
- offset: 0,
116
- },
117
- direction: 'backward',
118
- }),
119
- ).toEqual({
120
- path: [{_key: 'b0'}, 'children', {_key: 's0'}],
121
- offset: 0,
122
- })
123
- expect(
124
- blockOffsetToSpanSelectionPoint({
125
- context: {
126
- schema,
127
- value: [
128
- {
129
- _key: 'b0',
130
- _type: 'block',
131
- children: [
132
- {_key: 's0', _type: 'span', text: 'b'},
133
- {_key: 's1', _type: 'span', text: 'a'},
134
- {_key: 's2', _type: 'span', text: 'r'},
135
- ],
136
- },
137
- ],
138
- },
139
- blockOffset: {
140
- path: [{_key: 'b0'}],
141
- offset: 0,
142
- },
143
- direction: 'forward',
144
- }),
145
- ).toEqual({
146
- path: [{_key: 'b0'}, 'children', {_key: 's0'}],
147
- offset: 0,
148
- })
149
- expect(
150
- blockOffsetToSpanSelectionPoint({
151
- context: {
152
- schema,
153
- value: [
154
- {
155
- _key: 'b0',
156
- _type: 'block',
157
- children: [
158
- {_key: 's0', _type: 'span', text: 'b'},
159
- {_key: 's1', _type: 'span', text: 'a'},
160
- {_key: 's2', _type: 'span', text: 'r'},
161
- ],
162
- },
163
- ],
164
- },
165
- blockOffset: {
166
- path: [{_key: 'b0'}],
167
- offset: 3,
168
- },
169
- direction: 'forward',
170
- }),
171
- ).toEqual({
172
- path: [{_key: 'b0'}, 'children', {_key: 's2'}],
173
- offset: 1,
174
- })
175
- expect(
176
- blockOffsetToSpanSelectionPoint({
177
- context: {
178
- schema,
179
- value,
180
- },
181
- blockOffset: {
182
- path: [{_key: 'b1'}],
183
- offset: 0,
184
- },
185
- direction: 'forward',
186
- }),
187
- ).toBeUndefined()
188
- expect(
189
- blockOffsetToSpanSelectionPoint({
190
- context: {
191
- schema,
192
- value,
193
- },
194
- blockOffset: {
195
- path: [{_key: 'b2'}],
196
- offset: 9,
197
- },
198
- direction: 'forward',
199
- }),
200
- ).toEqual({
201
- path: [{_key: 'b2'}, 'children', {_key: 's2'}],
202
- offset: 2,
203
- })
204
- expect(
205
- blockOffsetToSpanSelectionPoint({
206
- context: {
207
- schema,
208
- value,
209
- },
210
- blockOffset: {
211
- path: [{_key: 'b3'}],
212
- offset: 9,
213
- },
214
- direction: 'forward',
215
- }),
216
- ).toEqual({
217
- path: [{_key: 'b3'}, 'children', {_key: 's3'}],
218
- offset: 9,
219
- })
220
- expect(
221
- blockOffsetToSpanSelectionPoint({
222
- context: {
223
- schema,
224
- value,
225
- },
226
- blockOffset: {
227
- path: [{_key: 'b3'}],
228
- offset: 10,
229
- },
230
- direction: 'forward',
231
- }),
232
- ).toEqual({
233
- path: [{_key: 'b3'}, 'children', {_key: 's3'}],
234
- offset: 10,
235
- })
236
- expect(
237
- blockOffsetToSpanSelectionPoint({
238
- context: {
239
- schema,
240
- value: [
241
- {
242
- _key: 'b0',
243
- _type: 'block',
244
- children: [
245
- {_key: 's0', _type: 'span', text: ''},
246
- {_key: 's1', _type: 'stock-ticker'},
247
- {_key: 's2', _type: 'span', text: 'foo'},
248
- {_key: 's3', _type: 'stock-ticker'},
249
- {_key: 's4', _type: 'span', text: ''},
250
- ],
251
- },
252
- ],
253
- },
254
- blockOffset: {
255
- path: [{_key: 'b0'}],
256
- offset: 0,
257
- },
258
- direction: 'forward',
259
- }),
260
- ).toEqual({
261
- path: [{_key: 'b0'}, 'children', {_key: 's0'}],
262
- offset: 0,
26
+ ]
27
+
28
+ describe('end of block', () => {
29
+ test('direction forward', () => {
30
+ expect(
31
+ blockOffsetToSpanSelectionPoint({
32
+ context: {
33
+ schema,
34
+ value,
35
+ },
36
+ blockOffset: {
37
+ path: [{_key: b0}],
38
+ offset: 3,
39
+ },
40
+ direction: 'forward',
41
+ }),
42
+ ).toEqual({
43
+ path: [{_key: b0}, 'children', {_key: s2}],
44
+ offset: 1,
45
+ })
46
+ })
47
+
48
+ test('direction backward', () => {
49
+ expect(
50
+ blockOffsetToSpanSelectionPoint({
51
+ context: {
52
+ schema,
53
+ value,
54
+ },
55
+ blockOffset: {
56
+ path: [{_key: b0}],
57
+ offset: 3,
58
+ },
59
+ direction: 'backward',
60
+ }),
61
+ ).toEqual({
62
+ path: [{_key: b0}, 'children', {_key: s2}],
63
+ offset: 1,
64
+ })
65
+ })
66
+ })
67
+
68
+ describe('start of block', () => {
69
+ test('direction forward', () => {
70
+ expect(
71
+ blockOffsetToSpanSelectionPoint({
72
+ context: {
73
+ schema,
74
+ value,
75
+ },
76
+ blockOffset: {
77
+ path: [{_key: b0}],
78
+ offset: 0,
79
+ },
80
+ direction: 'forward',
81
+ }),
82
+ ).toEqual({
83
+ path: [{_key: b0}, 'children', {_key: s0}],
84
+ offset: 0,
85
+ })
86
+ })
87
+
88
+ test('direction backward', () => {
89
+ expect(
90
+ blockOffsetToSpanSelectionPoint({
91
+ context: {
92
+ schema,
93
+ value,
94
+ },
95
+ blockOffset: {
96
+ path: [{_key: b0}],
97
+ offset: 0,
98
+ },
99
+ direction: 'backward',
100
+ }),
101
+ ).toEqual({
102
+ path: [{_key: b0}, 'children', {_key: s0}],
103
+ offset: 0,
104
+ })
105
+ })
106
+ })
263
107
  })
264
- expect(
265
- blockOffsetToSpanSelectionPoint({
266
- context: {
267
- schema,
268
- value: [
269
- {
270
- _key: 'b0',
271
- _type: 'block',
272
- children: [
273
- {_key: 's0', _type: 'span', text: ''},
274
- {_key: 's1', _type: 'stock-ticker'},
275
- {_key: 's2', _type: 'span', text: 'foo'},
276
- {_key: 's3', _type: 'stock-ticker'},
277
- {_key: 's4', _type: 'span', text: ''},
278
- ],
279
- },
108
+
109
+ describe('leading and trailing inline object', () => {
110
+ const keyGenerator = createTestKeyGenerator()
111
+ const blockKey = keyGenerator()
112
+ const leadingSpanKey = keyGenerator()
113
+ const leadingInlineObjectKey = keyGenerator()
114
+ const fooKey = keyGenerator()
115
+ const trailingInlineObjectKey = keyGenerator()
116
+ const trailingSpanKey = keyGenerator()
117
+ const value = [
118
+ {
119
+ _key: blockKey,
120
+ _type: 'block',
121
+ children: [
122
+ {_key: leadingSpanKey, _type: 'span', text: ''},
123
+ {_key: leadingInlineObjectKey, _type: 'stock-ticker'},
124
+ {_key: fooKey, _type: 'span', text: 'foo'},
125
+ {_key: trailingInlineObjectKey, _type: 'stock-ticker'},
126
+ {_key: trailingSpanKey, _type: 'span', text: ''},
280
127
  ],
281
128
  },
282
- blockOffset: {
283
- path: [{_key: 'b0'}],
284
- offset: 1,
285
- },
286
- direction: 'forward',
287
- }),
288
- ).toEqual({
289
- path: [{_key: 'b0'}, 'children', {_key: 's2'}],
290
- offset: 1,
129
+ ]
130
+
131
+ describe('start of block', () => {
132
+ test('direction forward', () => {
133
+ expect(
134
+ blockOffsetToSpanSelectionPoint({
135
+ context: {
136
+ schema,
137
+ value,
138
+ },
139
+ blockOffset: {
140
+ path: [{_key: blockKey}],
141
+ offset: 0,
142
+ },
143
+ direction: 'forward',
144
+ }),
145
+ ).toEqual({
146
+ path: [{_key: blockKey}, 'children', {_key: leadingSpanKey}],
147
+ offset: 0,
148
+ })
149
+ })
150
+
151
+ test('direction backward', () => {
152
+ expect(
153
+ blockOffsetToSpanSelectionPoint({
154
+ context: {
155
+ schema,
156
+ value,
157
+ },
158
+ blockOffset: {
159
+ path: [{_key: blockKey}],
160
+ offset: 0,
161
+ },
162
+ direction: 'backward',
163
+ }),
164
+ ).toEqual({
165
+ path: [{_key: blockKey}, 'children', {_key: fooKey}],
166
+ offset: 0,
167
+ })
168
+ })
169
+ })
170
+
171
+ describe('offset 1', () => {
172
+ test('direction forward', () => {
173
+ expect(
174
+ blockOffsetToSpanSelectionPoint({
175
+ context: {
176
+ schema,
177
+ value,
178
+ },
179
+ blockOffset: {
180
+ path: [{_key: blockKey}],
181
+ offset: 1,
182
+ },
183
+ direction: 'forward',
184
+ }),
185
+ ).toEqual({
186
+ path: [{_key: blockKey}, 'children', {_key: fooKey}],
187
+ offset: 1,
188
+ })
189
+ })
190
+
191
+ test('direction backward', () => {
192
+ expect(
193
+ blockOffsetToSpanSelectionPoint({
194
+ context: {
195
+ schema,
196
+ value,
197
+ },
198
+ blockOffset: {
199
+ path: [{_key: blockKey}],
200
+ offset: 1,
201
+ },
202
+ direction: 'backward',
203
+ }),
204
+ ).toEqual({
205
+ path: [{_key: blockKey}, 'children', {_key: fooKey}],
206
+ offset: 1,
207
+ })
208
+ })
209
+ })
210
+
211
+ describe('end of block', () => {
212
+ test('direction forward', () => {
213
+ expect(
214
+ blockOffsetToSpanSelectionPoint({
215
+ context: {
216
+ schema,
217
+ value,
218
+ },
219
+ blockOffset: {
220
+ path: [{_key: blockKey}],
221
+ offset: 3,
222
+ },
223
+ direction: 'forward',
224
+ }),
225
+ ).toEqual({
226
+ path: [{_key: blockKey}, 'children', {_key: fooKey}],
227
+ offset: 3,
228
+ })
229
+ })
230
+
231
+ test('direction backward', () => {
232
+ expect(
233
+ blockOffsetToSpanSelectionPoint({
234
+ context: {
235
+ schema,
236
+ value,
237
+ },
238
+ blockOffset: {
239
+ path: [{_key: blockKey}],
240
+ offset: 3,
241
+ },
242
+ direction: 'backward',
243
+ }),
244
+ ).toEqual({
245
+ path: [{_key: blockKey}, 'children', {_key: trailingSpanKey}],
246
+ offset: 0,
247
+ })
248
+ })
249
+ })
291
250
  })
292
- expect(
293
- blockOffsetToSpanSelectionPoint({
294
- context: {
295
- schema,
296
- value: [
251
+
252
+ test('only inline objects', () => {
253
+ const keyGenerator = createTestKeyGenerator()
254
+ const b0 = keyGenerator()
255
+ const b0s0 = keyGenerator()
256
+ const b0s1 = keyGenerator()
257
+ const b0s2 = keyGenerator()
258
+ const value = [
259
+ {
260
+ _key: b0,
261
+ _type: 'block',
262
+ children: [
297
263
  {
298
- _key: 'b0',
299
- _type: 'block',
300
- children: [
301
- {_key: 's0', _type: 'span', text: ''},
302
- {_key: 's1', _type: 'stock-ticker'},
303
- {_key: 's2', _type: 'span', text: 'foo'},
304
- {_key: 's3', _type: 'stock-ticker'},
305
- {_key: 's4', _type: 'span', text: ''},
306
- ],
264
+ _key: b0s0,
265
+ _type: 'stock-ticker',
307
266
  },
308
- ],
309
- },
310
- blockOffset: {
311
- path: [{_key: 'b0'}],
312
- offset: 0,
313
- },
314
- direction: 'backward',
315
- }),
316
- ).toEqual({
317
- path: [{_key: 'b0'}, 'children', {_key: 's2'}],
318
- offset: 0,
319
- })
320
- expect(
321
- blockOffsetToSpanSelectionPoint({
322
- context: {
323
- schema,
324
- value: [
325
267
  {
326
- _key: 'b0',
327
- _type: 'block',
328
- children: [
329
- {_key: 's0', _type: 'span', text: ''},
330
- {_key: 's1', _type: 'stock-ticker'},
331
- {_key: 's2', _type: 'span', text: 'foo'},
332
- {_key: 's3', _type: 'stock-ticker'},
333
- {_key: 's4', _type: 'span', text: ''},
334
- ],
268
+ _key: b0s1,
269
+ _type: 'stock-ticker',
335
270
  },
336
- ],
337
- },
338
- blockOffset: {
339
- path: [{_key: 'b0'}],
340
- offset: 1,
341
- },
342
- direction: 'backward',
343
- }),
344
- ).toEqual({
345
- path: [{_key: 'b0'}, 'children', {_key: 's2'}],
346
- offset: 1,
347
- })
348
- expect(
349
- blockOffsetToSpanSelectionPoint({
350
- context: {
351
- schema,
352
- value: [
353
271
  {
354
- _key: 'b0',
355
- _type: 'block',
356
- children: [
357
- {_key: 's0', _type: 'span', text: ''},
358
- {_key: 's1', _type: 'stock-ticker'},
359
- {_key: 's2', _type: 'span', text: 'foo'},
360
- {_key: 's3', _type: 'stock-ticker'},
361
- {_key: 's4', _type: 'span', text: ''},
362
- ],
272
+ _key: b0s2,
273
+ _type: 'stock-ticker',
363
274
  },
364
275
  ],
365
276
  },
366
- blockOffset: {
367
- path: [{_key: 'b0'}],
368
- offset: 3,
369
- },
370
- direction: 'forward',
371
- }),
372
- ).toEqual({
373
- path: [{_key: 'b0'}, 'children', {_key: 's2'}],
374
- offset: 3,
277
+ ]
278
+
279
+ expect(
280
+ blockOffsetToSpanSelectionPoint({
281
+ context: {
282
+ schema,
283
+ value,
284
+ },
285
+ blockOffset: {
286
+ path: [{_key: b0}],
287
+ offset: 0,
288
+ },
289
+ direction: 'forward',
290
+ }),
291
+ ).toBeUndefined()
292
+ expect(
293
+ blockOffsetToSpanSelectionPoint({
294
+ context: {
295
+ schema,
296
+ value,
297
+ },
298
+ blockOffset: {
299
+ path: [{_key: b0}],
300
+ offset: 1,
301
+ },
302
+ direction: 'forward',
303
+ }),
304
+ ).toBeUndefined()
375
305
  })
376
- expect(
377
- blockOffsetToSpanSelectionPoint({
378
- context: {
379
- schema,
380
- value: [
381
- {
382
- _key: 'b0',
383
- _type: 'block',
384
- children: [
385
- {_key: 's0', _type: 'span', text: ''},
386
- {_key: 's1', _type: 'stock-ticker'},
387
- {_key: 's2', _type: 'span', text: 'foo'},
388
- {_key: 's3', _type: 'stock-ticker'},
389
- {_key: 's4', _type: 'span', text: ''},
390
- ],
391
- },
392
- ],
393
- },
394
- blockOffset: {
395
- path: [{_key: 'b0'}],
396
- offset: 2,
397
- },
398
- direction: 'forward',
399
- }),
400
- ).toEqual({
401
- path: [{_key: 'b0'}, 'children', {_key: 's2'}],
402
- offset: 2,
306
+
307
+ test('block object', () => {
308
+ const keyGenerator = createTestKeyGenerator()
309
+ const b0 = keyGenerator()
310
+ const value = [
311
+ {
312
+ _key: b0,
313
+ _type: 'image',
314
+ },
315
+ ]
316
+
317
+ expect(
318
+ blockOffsetToSpanSelectionPoint({
319
+ context: {
320
+ schema,
321
+ value,
322
+ },
323
+ blockOffset: {
324
+ path: [{_key: b0}],
325
+ offset: 0,
326
+ },
327
+ direction: 'forward',
328
+ }),
329
+ ).toBeUndefined()
403
330
  })
404
- expect(
405
- blockOffsetToSpanSelectionPoint({
406
- context: {
407
- schema,
408
- value: [
331
+
332
+ test('text with formatting', () => {
333
+ const keyGenerator = createTestKeyGenerator()
334
+ const b1 = keyGenerator()
335
+ const b1s0 = keyGenerator()
336
+ const b1s1 = keyGenerator()
337
+
338
+ const value: Array<PortableTextBlock> = [
339
+ {
340
+ _key: b1,
341
+ _type: 'block',
342
+ children: [
409
343
  {
410
- _key: 'b0',
411
- _type: 'block',
412
- children: [
413
- {_key: 's0', _type: 'span', text: ''},
414
- {_key: 's1', _type: 'stock-ticker'},
415
- {_key: 's2', _type: 'span', text: 'foo'},
416
- {_key: 's3', _type: 'stock-ticker'},
417
- {_key: 's4', _type: 'span', text: ''},
418
- ],
344
+ _key: b1s0,
345
+ _type: 'span',
346
+ text: 'Hello, ',
419
347
  },
420
- ],
421
- },
422
- blockOffset: {
423
- path: [{_key: 'b0'}],
424
- offset: 3,
425
- },
426
- direction: 'backward',
427
- }),
428
- ).toEqual({
429
- path: [{_key: 'b0'}, 'children', {_key: 's4'}],
430
- offset: 0,
431
- })
432
- expect(
433
- blockOffsetToSpanSelectionPoint({
434
- context: {
435
- schema,
436
- value: [
437
348
  {
438
- _key: 'b0',
439
- _type: 'block',
440
- children: [
441
- {_key: 's0', _type: 'span', text: ''},
442
- {_key: 's1', _type: 'stock-ticker'},
443
- {_key: 's2', _type: 'span', text: 'foo'},
444
- {_key: 's3', _type: 'stock-ticker'},
445
- {_key: 's4', _type: 'span', text: ''},
446
- ],
349
+ _key: b1s1,
350
+ _type: 'span',
351
+ text: 'world!',
352
+ marks: ['strong'],
447
353
  },
448
354
  ],
449
355
  },
450
- blockOffset: {
451
- path: [{_key: 'b0'}],
452
- offset: 2,
453
- },
454
- direction: 'backward',
455
- }),
456
- ).toEqual({
457
- path: [{_key: 'b0'}, 'children', {_key: 's2'}],
458
- offset: 2,
459
- })
460
- expect(
461
- blockOffsetToSpanSelectionPoint({
462
- context: {
463
- schema,
464
- value,
465
- },
466
- blockOffset: {
467
- path: [{_key: 'b3'}],
468
- offset: 10,
469
- },
470
- direction: 'backward',
471
- }),
472
- ).toEqual({
473
- path: [{_key: 'b3'}, 'children', {_key: 's5'}],
474
- offset: 0,
475
- })
476
- expect(
477
- blockOffsetToSpanSelectionPoint({
478
- context: {
479
- schema,
480
- value,
481
- },
482
- blockOffset: {
483
- path: [{_key: 'b3'}],
484
- offset: 11,
485
- },
486
- direction: 'forward',
487
- }),
488
- ).toEqual({
489
- path: [{_key: 'b3'}, 'children', {_key: 's5'}],
490
- offset: 1,
356
+ ]
357
+
358
+ expect(
359
+ blockOffsetToSpanSelectionPoint({
360
+ context: {
361
+ schema,
362
+ value,
363
+ },
364
+ blockOffset: {
365
+ path: [{_key: b1}],
366
+ offset: 9,
367
+ },
368
+ direction: 'forward',
369
+ }),
370
+ ).toEqual({
371
+ path: [{_key: b1}, 'children', {_key: b1s1}],
372
+ offset: 2,
373
+ })
491
374
  })
492
- expect(
493
- blockOffsetToSpanSelectionPoint({
494
- context: {
495
- schema,
496
- value,
497
- },
498
- blockOffset: {
499
- path: [{_key: 'b4'}],
500
- offset: 0,
501
- },
502
- direction: 'forward',
503
- }),
504
- ).toBeUndefined()
505
- expect(
506
- blockOffsetToSpanSelectionPoint({
507
- context: {
508
- schema,
509
- value,
510
- },
511
- blockOffset: {
512
- path: [{_key: 'b4'}],
513
- offset: 1,
514
- },
515
- direction: 'forward',
516
- }),
517
- ).toBeUndefined()
518
375
  })