Skip to content

Commit e9e1996

Browse files
committed
Fix tests
1 parent 1010acf commit e9e1996

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

packages/slate/test/interfaces/Editor/nodes/pass/block.tsx

+3-3
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,8 @@ export const test = editor => {
1919
return Array.from(
2020
Editor.nodes(editor, {
2121
at: [],
22-
match: n => n.match,
23-
pass: ([n]) => n.pass,
22+
match: n => !!n.match,
23+
pass: ([n]) => !!n.pass,
2424
})
2525
)
2626
}
@@ -30,6 +30,6 @@ export const output = [
3030
<block pass match>
3131
three
3232
</block>,
33-
[1, 2],
33+
[1, 1],
3434
],
3535
]

packages/slate/test/interfaces/Node/nodes/pass.tsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ export const input = (
1212
</editor>
1313
)
1414
export const test = value => {
15-
return Array.from(Node.nodes(value, { pass: ([n]) => n.pass }))
15+
return Array.from(Node.nodes(value, { pass: ([n]) => !!n.pass }))
1616
}
1717
export const output = [
1818
[input, []],

0 commit comments

Comments
 (0)