test(cleanup): remove/reintorduce skipped tests (#2788)

This commit is contained in:
Erez Rokah 2019-10-23 13:22:48 +03:00 committed by GitHub
parent 76fdb93087
commit d38d4665c4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
8 changed files with 648 additions and 314 deletions

View File

@ -17,7 +17,7 @@
"scripts": {
"develop": "yarn build:esm --watch",
"build": "cross-env NODE_ENV=production webpack",
"build:esm": "cross-env NODE_ENV=esm babel src --out-dir dist/esm --ignore **/__tests__ --root-mode upward",
"build:esm": "cross-env NODE_ENV=esm babel src --out-dir dist/esm --ignore \"**/__tests__\" --root-mode upward",
"createFragmentTypes": "node scripts/createFragmentTypes.js"
},
"dependencies": {

View File

@ -17,7 +17,7 @@
"scripts": {
"develop": "yarn build:esm --watch",
"build": "cross-env NODE_ENV=production webpack",
"build:esm": "cross-env NODE_ENV=esm babel src --out-dir dist/esm --ignore **/__tests__ --root-mode upward"
"build:esm": "cross-env NODE_ENV=esm babel src --out-dir dist/esm --ignore \"**/__tests__\" --root-mode upward"
},
"dependencies": {
"js-base64": "^2.5.1",

View File

@ -13,7 +13,7 @@
"scripts": {
"develop": "yarn build:esm --watch",
"build": "cross-env NODE_ENV=production webpack",
"build:esm": "cross-env NODE_ENV=esm babel src --out-dir dist/esm --ignore **/__tests__ --root-mode upward"
"build:esm": "cross-env NODE_ENV=esm babel src --out-dir dist/esm --ignore \"**/__tests__\" --root-mode upward"
},
"keywords": [
"netlify",

View File

@ -61,25 +61,6 @@ describe('entryDraft reducer', () => {
});
});
describe('DRAFT_CHANGE', () => {
it.skip('should update the draft', () => {
const newEntry = {
...entry,
raw: 'updated',
};
expect(reducer(initialState, actions.changeDraft(newEntry))).toEqual(
fromJS({
entry: {
...entry,
raw: 'updated',
},
mediaFiles: [],
hasChanged: true,
}),
);
});
});
describe('persisting', () => {
beforeEach(() => {
initialState = fromJS({

View File

@ -17,7 +17,7 @@
"scripts": {
"develop": "yarn build:esm --watch",
"build": "cross-env NODE_ENV=production webpack",
"build:esm": "cross-env NODE_ENV=esm babel src --out-dir dist/esm --ignore **/__tests__ --root-mode upward"
"build:esm": "cross-env NODE_ENV=esm babel src --out-dir dist/esm --ignore \"**/__tests__\" --root-mode upward"
},
"devDependencies": {
"cross-env": "^5.2.0",

View File

@ -0,0 +1,625 @@
{
"\tfoo\tbaz\t\tbim\n": "NOT_TO_EQUAL",
" \tfoo\tbaz\t\tbim\n": "NOT_TO_EQUAL",
" a\ta\n ὐ\ta\n": "NOT_TO_EQUAL",
" - foo\n\n\tbar\n": "NOT_TO_EQUAL",
"- foo\n\n\t\tbar\n": "NOT_TO_EQUAL",
">\t\tfoo\n": "NOT_TO_EQUAL",
"-\t\tfoo\n": "NOT_TO_EQUAL",
" foo\n\tbar\n": "TO_EQUAL",
" - foo\n - bar\n\t - baz\n": "NOT_TO_EQUAL",
"#\tFoo\n": "TO_EQUAL",
"*\t*\t*\t\n": "TO_ERROR",
"- `one\n- two`\n": "TO_EQUAL",
"***\n---\n___\n": "NOT_TO_EQUAL",
"+++\n": "TO_EQUAL",
"===\n": "TO_EQUAL",
"--\n**\n__\n": "TO_EQUAL",
" ***\n ***\n ***\n": "NOT_TO_EQUAL",
" ***\n": "TO_EQUAL",
"Foo\n ***\n": "TO_EQUAL",
"_____________________________________\n": "NOT_TO_EQUAL",
" - - -\n": "NOT_TO_EQUAL",
" ** * ** * ** * **\n": "NOT_TO_EQUAL",
"- - - -\n": "NOT_TO_EQUAL",
"- - - - \n": "NOT_TO_EQUAL",
"_ _ _ _ a\n\na------\n\n---a---\n": "TO_EQUAL",
" *-*\n": "NOT_TO_EQUAL",
"- foo\n***\n- bar\n": "NOT_TO_EQUAL",
"Foo\n***\nbar\n": "NOT_TO_EQUAL",
"Foo\n---\nbar\n": "TO_EQUAL",
"* Foo\n* * *\n* Bar\n": "NOT_TO_EQUAL",
"- Foo\n- * * *\n": "NOT_TO_EQUAL",
"# foo\n## foo\n### foo\n#### foo\n##### foo\n###### foo\n": "TO_EQUAL",
"####### foo\n": "TO_EQUAL",
"#5 bolt\n\n#hashtag\n": "TO_EQUAL",
"\\## foo\n": "TO_EQUAL",
"# foo *bar* \\*baz\\*\n": "NOT_TO_EQUAL",
"# foo \n": "TO_EQUAL",
" ### foo\n ## foo\n # foo\n": "TO_EQUAL",
" # foo\n": "TO_EQUAL",
"foo\n # bar\n": "TO_EQUAL",
"## foo ##\n ### bar ###\n": "TO_EQUAL",
"# foo ##################################\n##### foo ##\n": "TO_EQUAL",
"### foo ### \n": "TO_EQUAL",
"### foo ### b\n": "TO_EQUAL",
"# foo#\n": "NOT_TO_EQUAL",
"### foo \\###\n## foo #\\##\n# foo \\#\n": "NOT_TO_EQUAL",
"****\n## foo\n****\n": "NOT_TO_EQUAL",
"Foo bar\n# baz\nBar foo\n": "TO_EQUAL",
"## \n#\n### ###\n": "TO_ERROR",
"Foo *bar*\n=========\n\nFoo *bar*\n---------\n": "TO_EQUAL",
"Foo *bar\nbaz*\n====\n": "NOT_TO_EQUAL",
"Foo\n-------------------------\n\nFoo\n=\n": "TO_EQUAL",
" Foo\n---\n\n Foo\n-----\n\n Foo\n ===\n": "NOT_TO_EQUAL",
" Foo\n ---\n\n Foo\n---\n": "NOT_TO_EQUAL",
"Foo\n ---- \n": "NOT_TO_EQUAL",
"Foo\n ---\n": "TO_EQUAL",
"Foo\n= =\n\nFoo\n--- -\n": "NOT_TO_EQUAL",
"Foo \n-----\n": "TO_EQUAL",
"Foo\\\n----\n": "TO_EQUAL",
"`Foo\n----\n`\n\n<a title=\"a lot\n---\nof dashes\"/>\n": "NOT_TO_EQUAL",
"> Foo\n---\n": "NOT_TO_EQUAL",
"> foo\nbar\n===\n": "NOT_TO_EQUAL",
"- Foo\n---\n": "NOT_TO_EQUAL",
"Foo\nBar\n---\n": "NOT_TO_EQUAL",
"---\nFoo\n---\nBar\n---\nBaz\n": "NOT_TO_EQUAL",
"\n====\n": "TO_EQUAL",
"---\n---\n": "TO_ERROR",
"- foo\n-----\n": "NOT_TO_EQUAL",
" foo\n---\n": "NOT_TO_EQUAL",
"> foo\n-----\n": "NOT_TO_EQUAL",
"\\> foo\n------\n": "NOT_TO_EQUAL",
"Foo\n\nbar\n---\nbaz\n": "TO_EQUAL",
"Foo\nbar\n\n---\n\nbaz\n": "NOT_TO_EQUAL",
"Foo\nbar\n* * *\nbaz\n": "NOT_TO_EQUAL",
"Foo\nbar\n\\---\nbaz\n": "NOT_TO_EQUAL",
" a simple\n indented code block\n": "TO_EQUAL",
" - foo\n\n bar\n": "NOT_TO_EQUAL",
"1. foo\n\n - bar\n": "TO_EQUAL",
" <a/>\n *hi*\n\n - one\n": "NOT_TO_EQUAL",
" chunk1\n\n chunk2\n \n \n \n chunk3\n": "TO_EQUAL",
" chunk1\n \n chunk2\n": "TO_EQUAL",
"Foo\n bar\n\n": "TO_EQUAL",
" foo\nbar\n": "TO_EQUAL",
"# Heading\n foo\nHeading\n------\n foo\n----\n": "NOT_TO_EQUAL",
" foo\n bar\n": "TO_EQUAL",
"\n \n foo\n \n\n": "TO_EQUAL",
" foo \n": "TO_EQUAL",
"```\n<\n >\n```\n": "NOT_TO_EQUAL",
"~~~\n<\n >\n~~~\n": "NOT_TO_EQUAL",
"``\nfoo\n``\n": "TO_EQUAL",
"```\naaa\n~~~\n```\n": "NOT_TO_EQUAL",
"~~~\naaa\n```\n~~~\n": "NOT_TO_EQUAL",
"````\naaa\n```\n``````\n": "NOT_TO_EQUAL",
"~~~~\naaa\n~~~\n~~~~\n": "NOT_TO_EQUAL",
"```\n": "TO_EQUAL",
"`````\n\n```\naaa\n": "NOT_TO_EQUAL",
"> ```\n> aaa\n\nbbb\n": "TO_EQUAL",
"```\n\n \n```\n": "NOT_TO_EQUAL",
"```\n```\n": "TO_EQUAL",
" ```\n aaa\naaa\n```\n": "TO_EQUAL",
" ```\naaa\n aaa\naaa\n ```\n": "TO_EQUAL",
" ```\n aaa\n aaa\n aaa\n ```\n": "TO_EQUAL",
" ```\n aaa\n ```\n": "NOT_TO_EQUAL",
"```\naaa\n ```\n": "TO_EQUAL",
" ```\naaa\n ```\n": "TO_EQUAL",
"```\naaa\n ```\n": "NOT_TO_EQUAL",
"``` ```\naaa\n": "TO_EQUAL",
"~~~~~~\naaa\n~~~ ~~\n": "NOT_TO_EQUAL",
"foo\n```\nbar\n```\nbaz\n": "TO_EQUAL",
"foo\n---\n~~~\nbar\n~~~\n# baz\n": "TO_EQUAL",
"```ruby\ndef foo(x)\n return 3\nend\n```\n": "TO_EQUAL",
"~~~~ ruby startline=3 $%@#$\ndef foo(x)\n return 3\nend\n~~~~~~~\n": "TO_EQUAL",
"````;\n````\n": "TO_EQUAL",
"``` aa ```\nfoo\n": "TO_EQUAL",
"```\n``` aaa\n```\n": "NOT_TO_EQUAL",
"<table><tr><td>\n<pre>\n**Hello**,\n\n_world_.\n</pre>\n</td></tr></table>\n": "NOT_TO_EQUAL",
"<table>\n <tr>\n <td>\n hi\n </td>\n </tr>\n</table>\n\nokay.\n": "TO_EQUAL",
" <div>\n *hello*\n <foo><a>\n": "NOT_TO_EQUAL",
"</div>\n*foo*\n": "NOT_TO_EQUAL",
"<DIV CLASS=\"foo\">\n\n*Markdown*\n\n</DIV>\n": "TO_EQUAL",
"<div id=\"foo\"\n class=\"bar\">\n</div>\n": "TO_EQUAL",
"<div id=\"foo\" class=\"bar\n baz\">\n</div>\n": "TO_EQUAL",
"<div>\n*foo*\n\n*bar*\n": "NOT_TO_EQUAL",
"<div id=\"foo\"\n*hi*\n": "NOT_TO_EQUAL",
"<div class\nfoo\n": "TO_EQUAL",
"<div *???-&&&-<---\n*foo*\n": "NOT_TO_EQUAL",
"<div><a href=\"bar\">*foo*</a></div>\n": "NOT_TO_EQUAL",
"<table><tr><td>\nfoo\n</td></tr></table>\n": "TO_EQUAL",
"<div></div>\n``` c\nint x = 33;\n```\n": "NOT_TO_EQUAL",
"<a href=\"foo\">\n*bar*\n</a>\n": "NOT_TO_EQUAL",
"<Warning>\n*bar*\n</Warning>\n": "NOT_TO_EQUAL",
"<i class=\"foo\">\n*bar*\n</i>\n": "NOT_TO_EQUAL",
"</ins>\n*bar*\n": "NOT_TO_EQUAL",
"<del>\n*foo*\n</del>\n": "NOT_TO_EQUAL",
"<del>\n\n*foo*\n\n</del>\n": "TO_EQUAL",
"<del>*foo*</del>\n": "TO_EQUAL",
"<pre language=\"haskell\"><code>\nimport Text.HTML.TagSoup\n\nmain :: IO ()\nmain = print $ parseTags tags\n</code></pre>\nokay\n": "TO_EQUAL",
"<script type=\"text/javascript\">\n// JavaScript example\n\ndocument.getElementById(\"demo\").innerHTML = \"Hello JavaScript!\";\n</script>\nokay\n": "TO_EQUAL",
"<style\n type=\"text/css\">\nh1 {color:red;}\n\np {color:blue;}\n</style>\nokay\n": "TO_EQUAL",
"<style\n type=\"text/css\">\n\nfoo\n": "TO_EQUAL",
"> <div>\n> foo\n\nbar\n": "TO_EQUAL",
"- <div>\n- foo\n": "TO_EQUAL",
"<style>p{color:red;}</style>\n*foo*\n": "TO_EQUAL",
"<!-- foo -->*bar*\n*baz*\n": "NOT_TO_EQUAL",
"<script>\nfoo\n</script>1. *bar*\n": "NOT_TO_EQUAL",
"<!-- Foo\n\nbar\n baz -->\nokay\n": "TO_EQUAL",
"<?php\n\n echo '>';\n\n?>\nokay\n": "TO_EQUAL",
"<!DOCTYPE html>\n": "TO_EQUAL",
"<![CDATA[\nfunction matchwo(a,b)\n{\n if (a < b && a < 0) then {\n return 1;\n\n } else {\n\n return 0;\n }\n}\n]]>\nokay\n": "NOT_TO_EQUAL",
" <!-- foo -->\n\n <!-- foo -->\n": "NOT_TO_EQUAL",
" <div>\n\n <div>\n": "NOT_TO_EQUAL",
"Foo\n<div>\nbar\n</div>\n": "TO_EQUAL",
"<div>\nbar\n</div>\n*foo*\n": "NOT_TO_EQUAL",
"Foo\n<a href=\"bar\">\nbaz\n": "TO_EQUAL",
"<div>\n\n*Emphasized* text.\n\n</div>\n": "TO_EQUAL",
"<div>\n*Emphasized* text.\n</div>\n": "NOT_TO_EQUAL",
"<table>\n\n<tr>\n\n<td>\nHi\n</td>\n\n</tr>\n\n</table>\n": "TO_EQUAL",
"<table>\n\n <tr>\n\n <td>\n Hi\n </td>\n\n </tr>\n\n</table>\n": "NOT_TO_EQUAL",
"[foo]: /url \"title\"\n\n[foo]\n": "TO_EQUAL",
" [foo]: \n /url \n 'the title' \n\n[foo]\n": "TO_EQUAL",
"[Foo*bar\\]]:my_(url) 'title (with parens)'\n\n[Foo*bar\\]]\n": "NOT_TO_EQUAL",
"[Foo bar]:\n<my%20url>\n'title'\n\n[Foo bar]\n": "TO_EQUAL",
"[foo]: /url '\ntitle\nline1\nline2\n'\n\n[foo]\n": "NOT_TO_EQUAL",
"[foo]: /url 'title\n\nwith blank line'\n\n[foo]\n": "TO_EQUAL",
"[foo]:\n/url\n\n[foo]\n": "TO_EQUAL",
"[foo]:\n\n[foo]\n": "TO_EQUAL",
"[foo]: /url\\bar\\*baz \"foo\\\"bar\\baz\"\n\n[foo]\n": "NOT_TO_EQUAL",
"[foo]\n\n[foo]: url\n": "TO_EQUAL",
"[foo]\n\n[foo]: first\n[foo]: second\n": "NOT_TO_EQUAL",
"[FOO]: /url\n\n[Foo]\n": "TO_EQUAL",
"[ΑΓΩ]: /φου\n\n[αγω]\n": "TO_EQUAL",
"[foo]: /url\n": "TO_ERROR",
"[\nfoo\n]: /url\nbar\n": "TO_EQUAL",
"[foo]: /url \"title\" ok\n": "NOT_TO_EQUAL",
"[foo]: /url\n\"title\" ok\n": "NOT_TO_EQUAL",
" [foo]: /url \"title\"\n\n[foo]\n": "NOT_TO_EQUAL",
"```\n[foo]: /url\n```\n\n[foo]\n": "TO_EQUAL",
"Foo\n[bar]: /baz\n\n[bar]\n": "TO_EQUAL",
"# [Foo]\n[foo]: /url\n> bar\n": "TO_EQUAL",
"[foo]: /foo-url \"foo\"\n[bar]: /bar-url\n \"bar\"\n[baz]: /baz-url\n\n[foo],\n[bar],\n[baz]\n": "TO_EQUAL",
"[foo]\n\n> [foo]: /url\n": "NOT_TO_EQUAL",
"aaa\n\nbbb\n": "TO_EQUAL",
"aaa\nbbb\n\nccc\nddd\n": "TO_EQUAL",
"aaa\n\n\nbbb\n": "TO_EQUAL",
" aaa\n bbb\n": "NOT_TO_EQUAL",
"aaa\n bbb\n ccc\n": "TO_EQUAL",
" aaa\nbbb\n": "NOT_TO_EQUAL",
" aaa\nbbb\n": "TO_EQUAL",
"aaa \nbbb \n": "NOT_TO_EQUAL",
" \n\naaa\n \n\n# aaa\n\n \n": "TO_EQUAL",
"> # Foo\n> bar\n> baz\n": "TO_EQUAL",
"># Foo\n>bar\n> baz\n": "TO_EQUAL",
" > # Foo\n > bar\n > baz\n": "TO_EQUAL",
" > # Foo\n > bar\n > baz\n": "NOT_TO_EQUAL",
"> # Foo\n> bar\nbaz\n": "TO_EQUAL",
"> bar\nbaz\n> foo\n": "TO_EQUAL",
"> foo\n---\n": "NOT_TO_EQUAL",
"> - foo\n- bar\n": "TO_EQUAL",
"> foo\n bar\n": "TO_EQUAL",
"> ```\nfoo\n```\n": "NOT_TO_EQUAL",
"> foo\n - bar\n": "NOT_TO_EQUAL",
">\n": "TO_ERROR",
">\n> \n> \n": "TO_ERROR",
">\n> foo\n> \n": "TO_EQUAL",
"> foo\n\n> bar\n": "NOT_TO_EQUAL",
"> foo\n> bar\n": "TO_EQUAL",
"> foo\n>\n> bar\n": "TO_EQUAL",
"foo\n> bar\n": "TO_EQUAL",
"> aaa\n***\n> bbb\n": "NOT_TO_EQUAL",
"> bar\nbaz\n": "TO_EQUAL",
"> bar\n\nbaz\n": "TO_EQUAL",
"> bar\n>\nbaz\n": "NOT_TO_EQUAL",
"> > > foo\nbar\n": "TO_EQUAL",
">>> foo\n> bar\n>>baz\n": "TO_EQUAL",
"> code\n\n> not code\n": "NOT_TO_EQUAL",
"A paragraph\nwith two lines.\n\n indented code\n\n> A block quote.\n": "TO_EQUAL",
"1. A paragraph\n with two lines.\n\n indented code\n\n > A block quote.\n": "TO_EQUAL",
"- one\n\n two\n": "NOT_TO_EQUAL",
"- one\n\n two\n": "NOT_TO_EQUAL",
" - one\n\n two\n": "NOT_TO_EQUAL",
" - one\n\n two\n": "NOT_TO_EQUAL",
" > > 1. one\n>>\n>> two\n": "NOT_TO_EQUAL",
">>- one\n>>\n > > two\n": "TO_EQUAL",
"-one\n\n2.two\n": "TO_EQUAL",
"- foo\n\n\n bar\n": "TO_EQUAL",
"1. foo\n\n ```\n bar\n ```\n\n baz\n\n > bam\n": "TO_EQUAL",
"- Foo\n\n bar\n\n\n baz\n": "NOT_TO_EQUAL",
"123456789. ok\n": "TO_EQUAL",
"1234567890. not ok\n": "NOT_TO_EQUAL",
"0. ok\n": "NOT_TO_EQUAL",
"003. ok\n": "TO_EQUAL",
"-1. not ok\n": "TO_EQUAL",
"- foo\n\n bar\n": "TO_EQUAL",
" 10. foo\n\n bar\n": "TO_EQUAL",
" indented code\n\nparagraph\n\n more code\n": "TO_EQUAL",
"1. indented code\n\n paragraph\n\n more code\n": "TO_EQUAL",
"1. indented code\n\n paragraph\n\n more code\n": "TO_EQUAL",
" foo\n\nbar\n": "NOT_TO_EQUAL",
"- foo\n\n bar\n": "NOT_TO_EQUAL",
"- foo\n\n bar\n": "NOT_TO_EQUAL",
"-\n foo\n-\n ```\n bar\n ```\n-\n baz\n": "NOT_TO_EQUAL",
"- \n foo\n": "TO_ERROR",
"-\n\n foo\n": "NOT_TO_EQUAL",
"- foo\n-\n- bar\n": "TO_ERROR",
"- foo\n- \n- bar\n": "TO_ERROR",
"1. foo\n2.\n3. bar\n": "TO_ERROR",
"*\n": "NOT_TO_EQUAL",
"foo\n*\n\nfoo\n1.\n": "TO_EQUAL",
" 1. A paragraph\n with two lines.\n\n indented code\n\n > A block quote.\n": "TO_EQUAL",
" 1. A paragraph\n with two lines.\n\n indented code\n\n > A block quote.\n": "TO_EQUAL",
" 1. A paragraph\n with two lines.\n\n indented code\n\n > A block quote.\n": "TO_EQUAL",
" 1. A paragraph\n with two lines.\n\n indented code\n\n > A block quote.\n": "NOT_TO_EQUAL",
" 1. A paragraph\nwith two lines.\n\n indented code\n\n > A block quote.\n": "NOT_TO_EQUAL",
" 1. A paragraph\n with two lines.\n": "TO_EQUAL",
"> 1. > Blockquote\ncontinued here.\n": "TO_EQUAL",
"> 1. > Blockquote\n> continued here.\n": "TO_EQUAL",
"- foo\n - bar\n - baz\n - boo\n": "NOT_TO_EQUAL",
"- foo\n - bar\n - baz\n - boo\n": "TO_EQUAL",
"10) foo\n - bar\n": "NOT_TO_EQUAL",
"10) foo\n - bar\n": "TO_EQUAL",
"- - foo\n": "TO_EQUAL",
"1. - 2. foo\n": "TO_EQUAL",
"- # Foo\n- Bar\n ---\n baz\n": "NOT_TO_EQUAL",
"- foo\n- bar\n+ baz\n": "TO_EQUAL",
"1. foo\n2. bar\n3) baz\n": "TO_EQUAL",
"Foo\n- bar\n- baz\n": "TO_EQUAL",
"The number of windows in my house is\n14. The number of doors is 6.\n": "NOT_TO_EQUAL",
"The number of windows in my house is\n1. The number of doors is 6.\n": "TO_EQUAL",
"- foo\n\n- bar\n\n\n- baz\n": "NOT_TO_EQUAL",
"- foo\n - bar\n - baz\n\n\n bim\n": "NOT_TO_EQUAL",
"- foo\n- bar\n\n<!-- -->\n\n- baz\n- bim\n": "TO_EQUAL",
"- foo\n\n notcode\n\n- foo\n\n<!-- -->\n\n code\n": "NOT_TO_EQUAL",
"- a\n - b\n - c\n - d\n - e\n - f\n - g\n - h\n- i\n": "NOT_TO_EQUAL",
"1. a\n\n 2. b\n\n 3. c\n": "NOT_TO_EQUAL",
"- a\n- b\n\n- c\n": "NOT_TO_EQUAL",
"* a\n*\n\n* c\n": "TO_ERROR",
"- a\n- b\n\n c\n- d\n": "NOT_TO_EQUAL",
"- a\n- b\n\n [ref]: /url\n- d\n": "NOT_TO_EQUAL",
"- a\n- ```\n b\n\n\n ```\n- c\n": "NOT_TO_EQUAL",
"- a\n - b\n\n c\n- d\n": "NOT_TO_EQUAL",
"* a\n > b\n >\n* c\n": "NOT_TO_EQUAL",
"- a\n > b\n ```\n c\n ```\n- d\n": "NOT_TO_EQUAL",
"- a\n": "TO_EQUAL",
"- a\n - b\n": "NOT_TO_EQUAL",
"1. ```\n foo\n ```\n\n bar\n": "TO_EQUAL",
"* foo\n * bar\n\n baz\n": "NOT_TO_EQUAL",
"- a\n - b\n - c\n\n- d\n - e\n - f\n": "TO_EQUAL",
"`hi`lo`\n": "TO_EQUAL",
"\\!\\\"\\#\\$\\%\\&\\'\\(\\)\\*\\+\\,\\-\\.\\/\\:\\;\\<\\=\\>\\?\\@\\[\\\\\\]\\^\\_\\`\\{\\|\\}\\~\n": "NOT_TO_EQUAL",
"\\\t\\A\\a\\ \\3\\φ\\«\n": "TO_EQUAL",
"\\*not emphasized*\n\\<br/> not a tag\n\\[not a link](/foo)\n\\`not code`\n1\\. not a list\n\\* not a list\n\\# not a heading\n\\[foo]: /url \"not a reference\"\n": "NOT_TO_EQUAL",
"\\\\*emphasis*\n": "NOT_TO_EQUAL",
"foo\\\nbar\n": "NOT_TO_EQUAL",
"`` \\[\\` ``\n": "TO_EQUAL",
" \\[\\]\n": "TO_EQUAL",
"~~~\n\\[\\]\n~~~\n": "TO_EQUAL",
"<http://example.com?find=\\*>\n": "NOT_TO_EQUAL",
"<a href=\"/bar\\/)\">\n": "TO_EQUAL",
"[foo](/bar\\* \"ti\\*tle\")\n": "TO_EQUAL",
"[foo]\n\n[foo]: /bar\\* \"ti\\*tle\"\n": "TO_EQUAL",
"``` foo\\+bar\nfoo\n```\n": "TO_EQUAL",
"&nbsp; &amp; &copy; &AElig; &Dcaron;\n&frac34; &HilbertSpace; &DifferentialD;\n&ClockwiseContourIntegral; &ngE;\n": "NOT_TO_EQUAL",
"&#35; &#1234; &#992; &#98765432; &#0;\n": "NOT_TO_EQUAL",
"&#X22; &#XD06; &#xcab;\n": "NOT_TO_EQUAL",
"&nbsp &x; &#; &#x;\n&ThisIsNotDefined; &hi?;\n": "NOT_TO_EQUAL",
"&copy\n": "NOT_TO_EQUAL",
"&MadeUpEntity;\n": "NOT_TO_EQUAL",
"<a href=\"&ouml;&ouml;.html\">\n": "TO_EQUAL",
"[foo](/f&ouml;&ouml; \"f&ouml;&ouml;\")\n": "TO_EQUAL",
"[foo]\n\n[foo]: /f&ouml;&ouml; \"f&ouml;&ouml;\"\n": "TO_EQUAL",
"``` f&ouml;&ouml;\nfoo\n```\n": "TO_EQUAL",
"`f&ouml;&ouml;`\n": "NOT_TO_EQUAL",
" f&ouml;f&ouml;\n": "NOT_TO_EQUAL",
"`foo`\n": "TO_EQUAL",
"`` foo ` bar ``\n": "TO_EQUAL",
"` `` `\n": "TO_EQUAL",
"`foo bar\n baz`\n": "TO_EQUAL",
"`a b`\n": "NOT_TO_EQUAL",
"`foo `` bar`\n": "TO_EQUAL",
"`foo\\`bar`\n": "TO_EQUAL",
"*foo`*`\n": "NOT_TO_EQUAL",
"[not a `link](/foo`)\n": "NOT_TO_EQUAL",
"`<a href=\"`\">`\n": "NOT_TO_EQUAL",
"<a href=\"`\">`\n": "TO_EQUAL",
"`<http://foo.bar.`baz>`\n": "NOT_TO_EQUAL",
"<http://foo.bar.`baz>`\n": "TO_EQUAL",
"```foo``\n": "NOT_TO_EQUAL",
"`foo\n": "TO_EQUAL",
"`foo``bar``\n": "NOT_TO_EQUAL",
"*foo bar*\n": "TO_EQUAL",
"a * foo bar*\n": "NOT_TO_EQUAL",
"a*\"foo\"*\n": "NOT_TO_EQUAL",
"* a *\n": "NOT_TO_EQUAL",
"foo*bar*\n": "TO_EQUAL",
"5*6*78\n": "NOT_TO_EQUAL",
"_foo bar_\n": "TO_EQUAL",
"_ foo bar_\n": "NOT_TO_EQUAL",
"a_\"foo\"_\n": "NOT_TO_EQUAL",
"foo_bar_\n": "NOT_TO_EQUAL",
"5_6_78\n": "TO_EQUAL",
"пристаням_стремятся_\n": "NOT_TO_EQUAL",
"aa_\"bb\"_cc\n": "NOT_TO_EQUAL",
"foo-_(bar)_\n": "TO_EQUAL",
"_foo*\n": "TO_EQUAL",
"*foo bar *\n": "NOT_TO_EQUAL",
"*foo bar\n*\n": "NOT_TO_EQUAL",
"*(*foo)\n": "NOT_TO_EQUAL",
"*(*foo*)*\n": "NOT_TO_EQUAL",
"*foo*bar\n": "NOT_TO_EQUAL",
"_foo bar _\n": "NOT_TO_EQUAL",
"_(_foo)\n": "TO_EQUAL",
"_(_foo_)_\n": "NOT_TO_EQUAL",
"_foo_bar\n": "TO_EQUAL",
"_пристаням_стремятся\n": "NOT_TO_EQUAL",
"_foo_bar_baz_\n": "TO_EQUAL",
"_(bar)_.\n": "TO_EQUAL",
"**foo bar**\n": "TO_EQUAL",
"** foo bar**\n": "NOT_TO_EQUAL",
"a**\"foo\"**\n": "NOT_TO_EQUAL",
"foo**bar**\n": "TO_EQUAL",
"__foo bar__\n": "TO_EQUAL",
"__ foo bar__\n": "NOT_TO_EQUAL",
"__\nfoo bar__\n": "NOT_TO_EQUAL",
"a__\"foo\"__\n": "NOT_TO_EQUAL",
"foo__bar__\n": "NOT_TO_EQUAL",
"5__6__78\n": "NOT_TO_EQUAL",
"пристаням__стремятся__\n": "NOT_TO_EQUAL",
"__foo, __bar__, baz__\n": "NOT_TO_EQUAL",
"foo-__(bar)__\n": "TO_EQUAL",
"**foo bar **\n": "NOT_TO_EQUAL",
"**(**foo)\n": "NOT_TO_EQUAL",
"*(**foo**)*\n": "TO_EQUAL",
"**Gomphocarpus (*Gomphocarpus physocarpus*, syn.\n*Asclepias physocarpa*)**\n": "TO_EQUAL",
"**foo \"*bar*\" foo**\n": "NOT_TO_EQUAL",
"**foo**bar\n": "TO_EQUAL",
"__foo bar __\n": "NOT_TO_EQUAL",
"__(__foo)\n": "NOT_TO_EQUAL",
"_(__foo__)_\n": "TO_EQUAL",
"__foo__bar\n": "NOT_TO_EQUAL",
"__пристаням__стремятся\n": "NOT_TO_EQUAL",
"__foo__bar__baz__\n": "NOT_TO_EQUAL",
"__(bar)__.\n": "TO_EQUAL",
"*foo [bar](/url)*\n": "TO_EQUAL",
"*foo\nbar*\n": "TO_EQUAL",
"_foo __bar__ baz_\n": "TO_EQUAL",
"_foo _bar_ baz_\n": "NOT_TO_EQUAL",
"__foo_ bar_\n": "NOT_TO_EQUAL",
"*foo *bar**\n": "NOT_TO_EQUAL",
"*foo **bar** baz*\n": "TO_EQUAL",
"*foo**bar**baz*\n": "TO_EQUAL",
"***foo** bar*\n": "NOT_TO_EQUAL",
"*foo **bar***\n": "NOT_TO_EQUAL",
"*foo**bar***\n": "NOT_TO_EQUAL",
"*foo **bar *baz* bim** bop*\n": "NOT_TO_EQUAL",
"*foo [*bar*](/url)*\n": "NOT_TO_EQUAL",
"** is not an empty emphasis\n": "TO_EQUAL",
"**** is not an empty strong emphasis\n": "TO_EQUAL",
"**foo [bar](/url)**\n": "TO_EQUAL",
"**foo\nbar**\n": "TO_EQUAL",
"__foo _bar_ baz__\n": "TO_EQUAL",
"__foo __bar__ baz__\n": "NOT_TO_EQUAL",
"____foo__ bar__\n": "NOT_TO_EQUAL",
"**foo **bar****\n": "NOT_TO_EQUAL",
"**foo *bar* baz**\n": "TO_EQUAL",
"**foo*bar*baz**\n": "NOT_TO_EQUAL",
"***foo* bar**\n": "TO_EQUAL",
"**foo *bar***\n": "TO_EQUAL",
"**foo *bar **baz**\nbim* bop**\n": "NOT_TO_EQUAL",
"**foo [*bar*](/url)**\n": "TO_EQUAL",
"__ is not an empty emphasis\n": "TO_EQUAL",
"____ is not an empty strong emphasis\n": "TO_EQUAL",
"foo ***\n": "TO_EQUAL",
"foo *\\**\n": "NOT_TO_EQUAL",
"foo *_*\n": "NOT_TO_EQUAL",
"foo *****\n": "NOT_TO_EQUAL",
"foo **\\***\n": "TO_EQUAL",
"foo **_**\n": "TO_EQUAL",
"**foo*\n": "TO_EQUAL",
"*foo**\n": "NOT_TO_EQUAL",
"***foo**\n": "NOT_TO_EQUAL",
"****foo*\n": "NOT_TO_EQUAL",
"**foo***\n": "NOT_TO_EQUAL",
"*foo****\n": "NOT_TO_EQUAL",
"foo ___\n": "TO_EQUAL",
"foo _\\__\n": "NOT_TO_EQUAL",
"foo _*_\n": "TO_EQUAL",
"foo _____\n": "NOT_TO_EQUAL",
"foo __\\___\n": "TO_EQUAL",
"foo __*__\n": "TO_EQUAL",
"__foo_\n": "TO_EQUAL",
"_foo__\n": "NOT_TO_EQUAL",
"___foo__\n": "NOT_TO_EQUAL",
"____foo_\n": "NOT_TO_EQUAL",
"__foo___\n": "NOT_TO_EQUAL",
"_foo____\n": "NOT_TO_EQUAL",
"**foo**\n": "TO_EQUAL",
"*_foo_*\n": "NOT_TO_EQUAL",
"__foo__\n": "TO_EQUAL",
"_*foo*_\n": "NOT_TO_EQUAL",
"****foo****\n": "NOT_TO_EQUAL",
"____foo____\n": "NOT_TO_EQUAL",
"******foo******\n": "NOT_TO_EQUAL",
"***foo***\n": "TO_EQUAL",
"_____foo_____\n": "NOT_TO_EQUAL",
"*foo _bar* baz_\n": "TO_EQUAL",
"*foo __bar *baz bim__ bam*\n": "NOT_TO_EQUAL",
"**foo **bar baz**\n": "NOT_TO_EQUAL",
"*foo *bar baz*\n": "NOT_TO_EQUAL",
"*[bar*](/url)\n": "NOT_TO_EQUAL",
"_foo [bar_](/url)\n": "NOT_TO_EQUAL",
"*<img src=\"foo\" title=\"*\"/>\n": "NOT_TO_EQUAL",
"**<a href=\"**\">\n": "NOT_TO_EQUAL",
"__<a href=\"__\">\n": "NOT_TO_EQUAL",
"*a `*`*\n": "NOT_TO_EQUAL",
"_a `_`_\n": "NOT_TO_EQUAL",
"**a<http://foo.bar/?q=**>\n": "NOT_TO_EQUAL",
"__a<http://foo.bar/?q=__>\n": "NOT_TO_EQUAL",
"[link](/uri \"title\")\n": "TO_EQUAL",
"[link](/uri)\n": "TO_EQUAL",
"[link]()\n": "TO_EQUAL",
"[link](<>)\n": "TO_EQUAL",
"[link](/my uri)\n": "TO_EQUAL",
"[link](</my uri>)\n": "NOT_TO_EQUAL",
"[link](foo\nbar)\n": "TO_EQUAL",
"[link](<foo\nbar>)\n": "TO_EQUAL",
"[link](\\(foo\\))\n": "TO_EQUAL",
"[link](foo(and(bar)))\n": "TO_EQUAL",
"[link](foo\\(and\\(bar\\))\n": "TO_EQUAL",
"[link](<foo(and(bar)>)\n": "TO_EQUAL",
"[link](foo\\)\\:)\n": "TO_EQUAL",
"[link](#fragment)\n\n[link](http://example.com#fragment)\n\n[link](http://example.com?foo=3#frag)\n": "TO_EQUAL",
"[link](foo\\bar)\n": "TO_EQUAL",
"[link](foo%20b&auml;)\n": "TO_EQUAL",
"[link](\"title\")\n": "TO_EQUAL",
"[link](/url \"title\")\n[link](/url 'title')\n[link](/url (title))\n": "TO_EQUAL",
"[link](/url \"title \\\"&quot;\")\n": "NOT_TO_EQUAL",
"[link](/url \"title\")\n": "NOT_TO_EQUAL",
"[link](/url \"title \"and\" title\")\n": "NOT_TO_EQUAL",
"[link](/url 'title \"and\" title')\n": "NOT_TO_EQUAL",
"[link]( /uri\n \"title\" )\n": "TO_EQUAL",
"[link] (/uri)\n": "NOT_TO_EQUAL",
"[link [foo [bar]]](/uri)\n": "NOT_TO_EQUAL",
"[link] bar](/uri)\n": "TO_EQUAL",
"[link [bar](/uri)\n": "TO_EQUAL",
"[link \\[bar](/uri)\n": "NOT_TO_EQUAL",
"[link *foo **bar** `#`*](/uri)\n": "TO_EQUAL",
"[![moon](moon.jpg)](/uri)\n": "NOT_TO_EQUAL",
"[foo [bar](/uri)](/uri)\n": "NOT_TO_EQUAL",
"[foo *[bar [baz](/uri)](/uri)*](/uri)\n": "NOT_TO_EQUAL",
"![[[foo](uri1)](uri2)](uri3)\n": "NOT_TO_EQUAL",
"*[foo*](/uri)\n": "NOT_TO_EQUAL",
"[foo *bar](baz*)\n": "TO_EQUAL",
"*foo [bar* baz]\n": "TO_EQUAL",
"[foo <bar attr=\"](baz)\">\n": "NOT_TO_EQUAL",
"[foo`](/uri)`\n": "NOT_TO_EQUAL",
"[foo<http://example.com/?search=](uri)>\n": "NOT_TO_EQUAL",
"[foo][bar]\n\n[bar]: /url \"title\"\n": "TO_EQUAL",
"[link [foo [bar]]][ref]\n\n[ref]: /uri\n": "NOT_TO_EQUAL",
"[link \\[bar][ref]\n\n[ref]: /uri\n": "NOT_TO_EQUAL",
"[link *foo **bar** `#`*][ref]\n\n[ref]: /uri\n": "TO_EQUAL",
"[![moon](moon.jpg)][ref]\n\n[ref]: /uri\n": "NOT_TO_EQUAL",
"[foo [bar](/uri)][ref]\n\n[ref]: /uri\n": "NOT_TO_EQUAL",
"[foo *bar [baz][ref]*][ref]\n\n[ref]: /uri\n": "NOT_TO_EQUAL",
"*[foo*][ref]\n\n[ref]: /uri\n": "NOT_TO_EQUAL",
"[foo *bar][ref]\n\n[ref]: /uri\n": "TO_EQUAL",
"[foo <bar attr=\"][ref]\">\n\n[ref]: /uri\n": "NOT_TO_EQUAL",
"[foo`][ref]`\n\n[ref]: /uri\n": "NOT_TO_EQUAL",
"[foo<http://example.com/?search=][ref]>\n\n[ref]: /uri\n": "NOT_TO_EQUAL",
"[foo][BaR]\n\n[bar]: /url \"title\"\n": "TO_EQUAL",
"[Толпой][Толпой] is a Russian word.\n\n[ТОЛПОЙ]: /url\n": "TO_EQUAL",
"[Foo\n bar]: /url\n\n[Baz][Foo bar]\n": "TO_EQUAL",
"[foo] [bar]\n\n[bar]: /url \"title\"\n": "NOT_TO_EQUAL",
"[foo]\n[bar]\n\n[bar]: /url \"title\"\n": "NOT_TO_EQUAL",
"[foo]: /url1\n\n[foo]: /url2\n\n[bar][foo]\n": "NOT_TO_EQUAL",
"[bar][foo\\!]\n\n[foo!]: /url\n": "NOT_TO_EQUAL",
"[foo][ref[]\n\n[ref[]: /uri\n": "NOT_TO_EQUAL",
"[foo][ref[bar]]\n\n[ref[bar]]: /uri\n": "NOT_TO_EQUAL",
"[[[foo]]]\n\n[[[foo]]]: /url\n": "TO_EQUAL",
"[foo][ref\\[]\n\n[ref\\[]: /uri\n": "TO_EQUAL",
"[bar\\\\]: /uri\n\n[bar\\\\]\n": "NOT_TO_EQUAL",
"[]\n\n[]: /uri\n": "TO_EQUAL",
"[\n ]\n\n[\n ]: /uri\n": "NOT_TO_EQUAL",
"[foo][]\n\n[foo]: /url \"title\"\n": "TO_EQUAL",
"[*foo* bar][]\n\n[*foo* bar]: /url \"title\"\n": "TO_EQUAL",
"[Foo][]\n\n[foo]: /url \"title\"\n": "TO_EQUAL",
"[foo] \n[]\n\n[foo]: /url \"title\"\n": "NOT_TO_EQUAL",
"[foo]\n\n[foo]: /url \"title\"\n": "TO_EQUAL",
"[*foo* bar]\n\n[*foo* bar]: /url \"title\"\n": "TO_EQUAL",
"[[*foo* bar]]\n\n[*foo* bar]: /url \"title\"\n": "TO_EQUAL",
"[[bar [foo]\n\n[foo]: /url\n": "TO_EQUAL",
"[Foo]\n\n[foo]: /url \"title\"\n": "TO_EQUAL",
"[foo] bar\n\n[foo]: /url\n": "TO_EQUAL",
"\\[foo]\n\n[foo]: /url \"title\"\n": "TO_EQUAL",
"[foo*]: /url\n\n*[foo*]\n": "NOT_TO_EQUAL",
"[foo][bar]\n\n[foo]: /url1\n[bar]: /url2\n": "TO_EQUAL",
"[foo][]\n\n[foo]: /url1\n": "TO_EQUAL",
"[foo]()\n\n[foo]: /url1\n": "TO_EQUAL",
"[foo](not a link)\n\n[foo]: /url1\n": "TO_EQUAL",
"[foo][bar][baz]\n\n[baz]: /url\n": "NOT_TO_EQUAL",
"[foo][bar][baz]\n\n[baz]: /url1\n[bar]: /url2\n": "TO_EQUAL",
"[foo][bar][baz]\n\n[baz]: /url1\n[foo]: /url2\n": "NOT_TO_EQUAL",
"![foo](/url \"title\")\n": "NOT_TO_EQUAL",
"![foo *bar*]\n\n[foo *bar*]: train.jpg \"train & tracks\"\n": "NOT_TO_EQUAL",
"![foo ![bar](/url)](/url2)\n": "NOT_TO_EQUAL",
"![foo [bar](/url)](/url2)\n": "NOT_TO_EQUAL",
"![foo *bar*][]\n\n[foo *bar*]: train.jpg \"train & tracks\"\n": "NOT_TO_EQUAL",
"![foo *bar*][foobar]\n\n[FOOBAR]: train.jpg \"train & tracks\"\n": "NOT_TO_EQUAL",
"![foo](train.jpg)\n": "NOT_TO_EQUAL",
"My ![foo bar](/path/to/train.jpg \"title\" )\n": "NOT_TO_EQUAL",
"![foo](<url>)\n": "NOT_TO_EQUAL",
"![](/url)\n": "NOT_TO_EQUAL",
"![foo][bar]\n\n[bar]: /url\n": "NOT_TO_EQUAL",
"![foo][bar]\n\n[BAR]: /url\n": "NOT_TO_EQUAL",
"![foo][]\n\n[foo]: /url \"title\"\n": "NOT_TO_EQUAL",
"![*foo* bar][]\n\n[*foo* bar]: /url \"title\"\n": "NOT_TO_EQUAL",
"![Foo][]\n\n[foo]: /url \"title\"\n": "NOT_TO_EQUAL",
"![foo] \n[]\n\n[foo]: /url \"title\"\n": "NOT_TO_EQUAL",
"![foo]\n\n[foo]: /url \"title\"\n": "NOT_TO_EQUAL",
"![*foo* bar]\n\n[*foo* bar]: /url \"title\"\n": "NOT_TO_EQUAL",
"![[foo]]\n\n[[foo]]: /url \"title\"\n": "NOT_TO_EQUAL",
"![Foo]\n\n[foo]: /url \"title\"\n": "NOT_TO_EQUAL",
"!\\[foo]\n\n[foo]: /url \"title\"\n": "TO_EQUAL",
"\\![foo]\n\n[foo]: /url \"title\"\n": "NOT_TO_EQUAL",
"<http://foo.bar.baz>\n": "TO_EQUAL",
"<http://foo.bar.baz/test?q=hello&id=22&boolean>\n": "NOT_TO_EQUAL",
"<irc://foo.bar:2233/baz>\n": "TO_EQUAL",
"<MAILTO:FOO@BAR.BAZ>\n": "NOT_TO_EQUAL",
"<a+b+c:d>\n": "NOT_TO_EQUAL",
"<made-up-scheme://foo,bar>\n": "TO_EQUAL",
"<http://../>\n": "TO_EQUAL",
"<localhost:5001/foo>\n": "NOT_TO_EQUAL",
"<http://foo.bar/baz bim>\n": "NOT_TO_EQUAL",
"<http://example.com/\\[\\>\n": "NOT_TO_EQUAL",
"<foo@bar.example.com>\n": "TO_EQUAL",
"<foo+special@Bar.baz-bar0.com>\n": "TO_EQUAL",
"<foo\\+@bar.example.com>\n": "NOT_TO_EQUAL",
"<>\n": "NOT_TO_EQUAL",
"< http://foo.bar >\n": "NOT_TO_EQUAL",
"<m:abc>\n": "NOT_TO_EQUAL",
"<foo.bar.baz>\n": "NOT_TO_EQUAL",
"http://example.com\n": "TO_EQUAL",
"foo@bar.example.com\n": "TO_EQUAL",
"<a><bab><c2c>\n": "TO_EQUAL",
"<a/><b2/>\n": "TO_EQUAL",
"<a /><b2\ndata=\"foo\" >\n": "TO_EQUAL",
"<a foo=\"bar\" bam = 'baz <em>\"</em>'\n_boolean zoop:33=zoop:33 />\n": "TO_EQUAL",
"Foo <responsive-image src=\"foo.jpg\" />\n": "TO_EQUAL",
"<33> <__>\n": "NOT_TO_EQUAL",
"<a h*#ref=\"hi\">\n": "NOT_TO_EQUAL",
"<a href=\"hi'> <a href=hi'>\n": "NOT_TO_EQUAL",
"< a><\nfoo><bar/ >\n": "NOT_TO_EQUAL",
"<a href='bar'title=title>\n": "NOT_TO_EQUAL",
"</a></foo >\n": "TO_EQUAL",
"</a href=\"foo\">\n": "NOT_TO_EQUAL",
"foo <!-- this is a\ncomment - with hyphen -->\n": "TO_EQUAL",
"foo <!-- not a comment -- two hyphens -->\n": "NOT_TO_EQUAL",
"foo <!--> foo -->\n\nfoo <!-- foo--->\n": "NOT_TO_EQUAL",
"foo <?php echo $a; ?>\n": "TO_EQUAL",
"foo <!ELEMENT br EMPTY>\n": "TO_EQUAL",
"foo <![CDATA[>&<]]>\n": "NOT_TO_EQUAL",
"foo <a href=\"&ouml;\">\n": "TO_EQUAL",
"foo <a href=\"\\*\">\n": "TO_EQUAL",
"<a href=\"\\\"\">\n": "NOT_TO_EQUAL",
"foo \nbaz\n": "NOT_TO_EQUAL",
"foo\\\nbaz\n": "NOT_TO_EQUAL",
"foo \nbaz\n": "NOT_TO_EQUAL",
"foo \n bar\n": "NOT_TO_EQUAL",
"foo\\\n bar\n": "NOT_TO_EQUAL",
"*foo \nbar*\n": "NOT_TO_EQUAL",
"*foo\\\nbar*\n": "NOT_TO_EQUAL",
"`code \nspan`\n": "TO_EQUAL",
"`code\\\nspan`\n": "TO_EQUAL",
"<a href=\"foo \nbar\">\n": "TO_EQUAL",
"<a href=\"foo\\\nbar\">\n": "TO_EQUAL",
"foo\\\n": "TO_EQUAL",
"foo \n": "TO_EQUAL",
"### foo\\\n": "TO_EQUAL",
"### foo \n": "TO_EQUAL",
"foo\nbaz\n": "TO_EQUAL",
"foo \n baz\n": "TO_EQUAL",
"hello $.;'there\n": "TO_EQUAL",
"Foo χρῆν\n": "TO_EQUAL",
"Multiple spaces\n": "TO_EQUAL"
}

View File

@ -1,5 +1,6 @@
import { flow, trim } from 'lodash';
import commonmarkSpec from './__fixtures__/commonmark.json';
import expected from './__fixtures__/commonmarkExpected.json';
import { markdownToSlate, slateToMarkdown, markdownToHtml } from '../index.js';
/**
@ -18,13 +19,27 @@ const process = flow([markdownToSlate, slateToMarkdown, markdownToHtml]);
/**
* Passing this test suite requires 100% Commonmark compliance. There are 624
* tests, of which we're passing about 300 as of introduction of this suite. To
* work on improving Commonmark support, remove `.skip` from this `describe`
* and run the test suite locally.
* work on improving Commonmark support, update __fixtures__/commonmarkExpected.json
*/
describe.skip('Commonmark support', () => {
describe('Commonmark support', () => {
test.each(spec)('%s', (markdown, html) => {
// We're trimming the html from the spec as they all have trailing newlines
// and we never output trailing newlines. This may be a compliance issue.
expect(process(markdown)).toEqual(trim(html));
const trimmedHtml = trim(html);
switch (expected[markdown]) {
case 'TO_EQUAL':
expect(process(markdown)).toEqual(trimmedHtml);
break;
case 'NOT_TO_EQUAL':
expect(process(markdown)).not.toEqual(trimmedHtml);
break;
case 'TO_ERROR':
expect(() => process(markdown)).toThrowError();
break;
default:
throw new Error('Unknown expected type: ' + expected[markdown]);
}
});
});

View File

@ -87,291 +87,4 @@ describe('slate', () => {
};
expect(slateToMarkdown(slateAst)).toEqual('foo **bar**');
});
describe.skip('with nested styles within a single word', () => {
it('should not produce invalid markdown when a bold word has italics applied to a smaller part', () => {
const slateAst = {
object: 'block',
type: 'root',
nodes: [
{
object: 'block',
type: 'paragraph',
nodes: [
{
object: 'text',
data: undefined,
leaves: [
{ text: 'h', marks: [{ type: 'bold' }] },
{ text: 'e', marks: [{ type: 'bold' }, { type: 'italic' }] },
{ text: 'y', marks: [{ type: 'bold' }] },
],
},
],
},
],
};
expect(slateToMarkdown(slateAst)).toEqual('**h**_**e**_**y**');
});
it('should not produce invalid markdown when an italic word has bold applied to a smaller part', () => {
const slateAst = {
object: 'block',
type: 'root',
nodes: [
{
object: 'block',
type: 'paragraph',
nodes: [
{
object: 'text',
data: undefined,
leaves: [
{ text: 'h', marks: [{ type: 'italic' }] },
{ text: 'e', marks: [{ type: 'italic' }, { type: 'bold' }] },
{ text: 'y', marks: [{ type: 'italic' }] },
],
},
],
},
],
};
expect(slateToMarkdown(slateAst)).toEqual('_h**_e_**y_');
});
it('should not produce invalid markdown when an italic word has bold applied to a smaller part', () => {
const slateAst = {
object: 'block',
type: 'root',
nodes: [
{
object: 'block',
type: 'paragraph',
nodes: [
{
object: 'text',
data: undefined,
leaves: [
{ text: 'h', marks: [{ type: 'italic' }] },
{ text: 'e', marks: [{ type: 'italic' }, { type: 'bold' }] },
{ text: 'y', marks: [{ type: 'italic' }] },
],
},
],
},
],
};
expect(slateToMarkdown(slateAst)).toEqual('_h**_e_**y_');
});
it('should handle italics inside bold inside strikethrough', () => {
const slateAst = {
object: 'block',
type: 'root',
nodes: [
{
object: 'block',
type: 'paragraph',
nodes: [
{
object: 'text',
data: undefined,
leaves: [
{ text: 'h', marks: [{ type: 'strikethrough' }] },
{
text: 'e',
marks: [{ type: 'strikethrough' }, { type: 'bold' }],
},
{
text: 'l',
marks: [{ type: 'strikethrough' }, { type: 'bold' }, { type: 'italic' }],
},
{
text: 'l',
marks: [{ type: 'strikethrough' }, { type: 'bold' }],
},
{ text: 'o', marks: [{ type: 'strikethrough' }] },
],
},
],
},
],
};
expect(slateToMarkdown(slateAst)).toEqual('~~h~~**~~e~~**_~~**l**~~_**~~l~~**~~o~~');
});
it('should handle bold inside italics inside strikethrough', () => {
const slateAst = {
object: 'block',
type: 'root',
nodes: [
{
object: 'block',
type: 'paragraph',
nodes: [
{
object: 'text',
data: undefined,
leaves: [
{ text: 'h', marks: [{ type: 'strikethrough' }] },
{
text: 'e',
marks: [{ type: 'strikethrough' }, { type: 'italic' }],
},
{
text: 'l',
marks: [{ type: 'strikethrough' }, { type: 'italic' }, { type: 'bold' }],
},
{
text: 'l',
marks: [{ type: 'strikethrough' }, { type: 'italic' }],
},
{ text: 'o', marks: [{ type: 'strikethrough' }] },
],
},
],
},
],
};
expect(slateToMarkdown(slateAst)).toEqual('~~h~~_~~e~~_**_~~l~~_**_~~l~~_~~o~~');
});
it('should handle strikethrough inside italics inside bold', () => {
const slateAst = {
object: 'block',
type: 'root',
nodes: [
{
object: 'block',
type: 'paragraph',
nodes: [
{
object: 'text',
data: undefined,
leaves: [
{ text: 'h', marks: [{ type: 'bold' }] },
{ text: 'e', marks: [{ type: 'bold' }, { type: 'italic' }] },
{
text: 'l',
marks: [{ type: 'bold' }, { type: 'italic' }, { type: 'strikethrough' }],
},
{ text: 'l', marks: [{ type: 'bold' }, { type: 'italic' }] },
{ text: 'o', marks: [{ type: 'bold' }] },
],
},
],
},
],
};
expect(slateToMarkdown(slateAst)).toEqual('**h**_**e**_~~**_l_**~~_**l**_**o**');
});
it('should handle italics inside strikethrough inside bold', () => {
const slateAst = {
object: 'block',
type: 'root',
nodes: [
{
object: 'block',
type: 'paragraph',
nodes: [
{
object: 'text',
data: undefined,
leaves: [
{ text: 'h', marks: [{ type: 'bold' }] },
{
text: 'e',
marks: [{ type: 'bold' }, { type: 'strikethrough' }],
},
{
text: 'l',
marks: [{ type: 'bold' }, { type: 'strikethrough' }, { type: 'italic' }],
},
{
text: 'l',
marks: [{ type: 'bold' }, { type: 'strikethrough' }],
},
{ text: 'o', marks: [{ type: 'bold' }] },
],
},
],
},
],
};
expect(slateToMarkdown(slateAst)).toEqual('**h**~~**e**~~_~~**l**~~_~~**l**~~**o**');
});
it('should handle strikethrough inside bold inside italics', () => {
const slateAst = {
object: 'block',
type: 'root',
nodes: [
{
object: 'block',
type: 'paragraph',
nodes: [
{
object: 'text',
data: undefined,
leaves: [
{ text: 'h', marks: [{ type: 'italic' }] },
{ text: 'e', marks: [{ type: 'italic' }, { type: 'bold' }] },
{
text: 'l',
marks: [{ type: 'italic' }, { type: 'bold' }, { type: 'strikethrough' }],
},
{ text: 'l', marks: [{ type: 'italic' }, { type: 'bold' }] },
{ text: 'o', marks: [{ type: 'italic' }] },
],
},
],
},
],
};
expect(slateToMarkdown(slateAst)).toEqual('_h_**_e_**~~**_l_**~~**_l_**_o_');
});
it('should handle bold inside strikethrough inside italics', () => {
const slateAst = {
object: 'block',
type: 'root',
nodes: [
{
object: 'block',
type: 'paragraph',
nodes: [
{
object: 'text',
data: undefined,
leaves: [
{ text: 'h', marks: [{ type: 'italic' }] },
{
text: 'e',
marks: [{ type: 'italic' }, { type: 'strikethrough' }],
},
{
text: 'l',
marks: [{ type: 'italic' }, { type: 'strikethrough' }, { type: 'bold' }],
},
{
text: 'l',
marks: [{ type: 'italic' }, { type: 'strikethrough' }],
},
{ text: 'o', marks: [{ type: 'italic' }] },
],
},
],
},
],
};
expect(slateToMarkdown(slateAst)).toEqual('_h_~~_e_~~**_~~l~~_**~~_l_~~_o_');
});
});
});