Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add test for list joining #64

Open
marekdedic opened this issue Jul 11, 2023 · 1 comment
Open

Add test for list joining #64

marekdedic opened this issue Jul 11, 2023 · 1 comment

Comments

@marekdedic
Copy link
Owner

The input rules for list joining are currently not tested, because without keymaps (#61), there is no way to "exit" a list (Enter is provided by the keymap)

@marekdedic
Copy link
Owner Author

/*
TODO: Fix this test of joining lists - probably \n != Enter key
.shouldMatchInputRule(
"1. Hello World!\n\n\n2. Second item",
(schema) => [
schema.nodes["ordered_list"].createAndFill({}, [
schema.nodes["list_item"].createAndFill({}, [
schema.nodes["paragraph"].createAndFill({}, [
schema.text("Hello World!"),
])!,
])!,
schema.nodes["list_item"].createAndFill({}, [
schema.nodes["paragraph"].createAndFill({}, [
schema.text("Second line"),
])!,
])!,
])!,
],
"1. Hello World!\n2. Second item"
)
*/

/*
TODO: Fix this test of joining lists - probably \n != Enter key
.shouldMatchInputRule(
"* Hello World!\n\n\n2. Second item",
(schema) => [
schema.nodes["bullet_list"].createAndFill({}, [
schema.nodes["list_item"].createAndFill({}, [
schema.nodes["paragraph"].createAndFill({}, [
schema.text("Hello World!"),
])!,
])!,
schema.nodes["list_item"].createAndFill({}, [
schema.nodes["paragraph"].createAndFill({}, [
schema.text("Second line"),
])!,
])!,
])!,
],
"* Hello World!\n2. Second item"
)
*/

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant