Parcourir la source

Fix upcoming ESLint problems in tests.

Maciej Gołaszewski il y a 5 ans
Parent
commit
597ead2540

+ 6 - 6
packages/ckeditor5-markdown-gfm/tests/gfmdataprocessor/blockquotes.js

@@ -3,12 +3,12 @@
  * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
  */
 
-import { testDataProcessor as test } from '../../tests/_utils/utils';
+import { testDataProcessor } from '../_utils/utils';
 
 describe( 'GFMDataProcessor', () => {
 	describe( 'blockquotes', () => {
 		it( 'should process single blockquotes', () => {
-			test(
+			testDataProcessor(
 				'> foo bar',
 
 				// GitHub is rendering as:
@@ -21,7 +21,7 @@ describe( 'GFMDataProcessor', () => {
 		} );
 
 		it( 'should process nested blockquotes', () => {
-			test(
+			testDataProcessor(
 				'> foo\n' +
 				'> \n' +
 				'> > bar\n' +
@@ -49,7 +49,7 @@ describe( 'GFMDataProcessor', () => {
 		} );
 
 		it( 'should process list within a blockquote', () => {
-			test(
+			testDataProcessor(
 				'> A list within a blockquote:\n' +
 				'> \n' +
 				'> *   asterisk 1\n' +
@@ -78,7 +78,7 @@ describe( 'GFMDataProcessor', () => {
 		} );
 
 		it( 'should process blockquotes with code inside with ```', () => {
-			test(
+			testDataProcessor(
 				'> Example 1:\n' +
 				'> \n' +
 				'> ```\n' +
@@ -121,7 +121,7 @@ describe( 'GFMDataProcessor', () => {
 		} );
 
 		it( 'should process blockquotes with code inside with tabs', () => {
-			test(
+			testDataProcessor(
 				'> Example 1:\n' +
 				'>\n' +
 				'>     code 1\n' +

+ 18 - 18
packages/ckeditor5-markdown-gfm/tests/gfmdataprocessor/code.js

@@ -3,12 +3,12 @@
  * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
  */
 
-import { testDataProcessor as test } from '../../tests/_utils/utils';
+import { testDataProcessor } from '../_utils/utils';
 
 describe( 'GFMDataProcessor', () => {
 	describe( 'code', () => {
 		it( 'should process inline code', () => {
-			test(
+			testDataProcessor(
 				'regular text and `inline code`',
 
 				'<p>regular text and <code>inline code</code></p>'
@@ -16,7 +16,7 @@ describe( 'GFMDataProcessor', () => {
 		} );
 
 		it( 'should properly process multiple code', () => {
-			test(
+			testDataProcessor(
 				'`this is code` and this is `too`',
 
 				'<p><code>this is code</code> and this is <code>too</code></p>'
@@ -24,7 +24,7 @@ describe( 'GFMDataProcessor', () => {
 		} );
 
 		it( 'should process spaces inside inline code', () => {
-			test(
+			testDataProcessor(
 				'regular text and` inline code`',
 
 				'<p>regular text and<code>inline code</code></p>',
@@ -36,7 +36,7 @@ describe( 'GFMDataProcessor', () => {
 		} );
 
 		it( 'should properly process backticks inside code spans #1', () => {
-			test(
+			testDataProcessor(
 				'`` `backticks` ``',
 
 				'<p><code>`backticks`</code></p>'
@@ -44,7 +44,7 @@ describe( 'GFMDataProcessor', () => {
 		} );
 
 		it( 'should properly process backticks inside code spans #2', () => {
-			test(
+			testDataProcessor(
 				'`` some `backticks` inside ``',
 
 				'<p><code>some `backticks` inside</code></p>'
@@ -52,7 +52,7 @@ describe( 'GFMDataProcessor', () => {
 		} );
 
 		it( 'should process code blocks indented with tabs', () => {
-			test(
+			testDataProcessor(
 				'	code block',
 
 				// GitHub is rendering as:
@@ -68,7 +68,7 @@ describe( 'GFMDataProcessor', () => {
 		} );
 
 		it( 'should process code blocks indented with spaces', () => {
-			test(
+			testDataProcessor(
 				'    code block',
 
 				// GitHub is rendering as:
@@ -86,7 +86,7 @@ describe( 'GFMDataProcessor', () => {
 		} );
 
 		it( 'should process multi line code blocks indented with tabs', () => {
-			test(
+			testDataProcessor(
 				'	first line\n' +
 				'	second line',
 
@@ -108,7 +108,7 @@ describe( 'GFMDataProcessor', () => {
 		} );
 
 		it( 'should process multi line code blocks indented with spaces', () => {
-			test(
+			testDataProcessor(
 				'    first line\n' +
 				'    second line',
 
@@ -130,7 +130,7 @@ describe( 'GFMDataProcessor', () => {
 		} );
 
 		it( 'should process multi line code blocks with trailing spaces', () => {
-			test(
+			testDataProcessor(
 				'	the lines in this block  \n' +
 				'	all contain trailing spaces  ',
 
@@ -151,7 +151,7 @@ describe( 'GFMDataProcessor', () => {
 		} );
 
 		it( 'should process code block with language name', () => {
-			test(
+			testDataProcessor(
 				'``` js\n' +
 				'var a = \'hello\';\n' +
 				'console.log(a + \' world\');\n' +
@@ -166,7 +166,7 @@ describe( 'GFMDataProcessor', () => {
 		} );
 
 		it( 'should process code block with language name and using ~~~ as delimiter', () => {
-			test(
+			testDataProcessor(
 				'~~~ bash\n' +
 				'#!/bin/bash\n' +
 				'~~~',
@@ -185,7 +185,7 @@ describe( 'GFMDataProcessor', () => {
 		} );
 
 		it( 'should process code block with language name and using ``````` as delimiter', () => {
-			test(
+			testDataProcessor(
 				'``````` js\n' +
 				'var a = \'hello\';\n' +
 				'console.log(a + \' world\');\n' +
@@ -207,7 +207,7 @@ describe( 'GFMDataProcessor', () => {
 		} );
 
 		it( 'should process code block with language name and using ~~~~~~~~~~ as delimiter', () => {
-			test(
+			testDataProcessor(
 				'~~~~~~~~~~ js\n' +
 				'var a = \'hello\';\n' +
 				'console.log(a + \' world\');\n' +
@@ -229,7 +229,7 @@ describe( 'GFMDataProcessor', () => {
 		} );
 
 		it( 'should process empty code block', () => {
-			test(
+			testDataProcessor(
 				'``` js\n' +
 				'```',
 
@@ -246,7 +246,7 @@ describe( 'GFMDataProcessor', () => {
 		} );
 
 		it( 'should process code block with empty line', () => {
-			test(
+			testDataProcessor(
 				'``` js\n' +
 				'\n' +
 				'```',
@@ -264,7 +264,7 @@ describe( 'GFMDataProcessor', () => {
 		} );
 
 		it( 'should process nested code', () => {
-			test(
+			testDataProcessor(
 				'````` code `` code ``` `````',
 
 				// GitHub is rendering as:

+ 13 - 13
packages/ckeditor5-markdown-gfm/tests/gfmdataprocessor/headers.js

@@ -3,12 +3,12 @@
  * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
  */
 
-import { testDataProcessor as test } from '../../tests/_utils/utils';
+import { testDataProcessor } from '../_utils/utils';
 
 describe( 'GFMDataProcessor', () => {
 	describe( 'headers', () => {
 		it( 'should process level 1 header #1', () => {
-			test(
+			testDataProcessor(
 				'# Level 1',
 
 				'<h1>Level 1</h1>'
@@ -16,7 +16,7 @@ describe( 'GFMDataProcessor', () => {
 		} );
 
 		it( 'should process level 1 header #2', () => {
-			test(
+			testDataProcessor(
 				'Level 1\n' +
 				'===',
 
@@ -28,7 +28,7 @@ describe( 'GFMDataProcessor', () => {
 		} );
 
 		it( 'should process level 2 header #1', () => {
-			test(
+			testDataProcessor(
 				'## Level 2',
 
 				'<h2>Level 2</h2>'
@@ -36,7 +36,7 @@ describe( 'GFMDataProcessor', () => {
 		} );
 
 		it( 'should process level 2 header #2', () => {
-			test(
+			testDataProcessor(
 				'Level 2\n' +
 				'---',
 
@@ -48,7 +48,7 @@ describe( 'GFMDataProcessor', () => {
 		} );
 
 		it( 'should process level 3 header', () => {
-			test(
+			testDataProcessor(
 				'### Level 3',
 
 				'<h3>Level 3</h3>'
@@ -56,7 +56,7 @@ describe( 'GFMDataProcessor', () => {
 		} );
 
 		it( 'should process level 4 header', () => {
-			test(
+			testDataProcessor(
 				'#### Level 4',
 
 				'<h4>Level 4</h4>'
@@ -64,7 +64,7 @@ describe( 'GFMDataProcessor', () => {
 		} );
 
 		it( 'should process level 5 header', () => {
-			test(
+			testDataProcessor(
 				'##### Level 5',
 
 				'<h5>Level 5</h5>'
@@ -72,7 +72,7 @@ describe( 'GFMDataProcessor', () => {
 		} );
 
 		it( 'should process level 6 header', () => {
-			test(
+			testDataProcessor(
 				'###### Level 6',
 
 				'<h6>Level 6</h6>'
@@ -80,7 +80,7 @@ describe( 'GFMDataProcessor', () => {
 		} );
 
 		it( 'should create header when more spaces before text', () => {
-			test(
+			testDataProcessor(
 				'#      Level 1',
 
 				'<h1>Level 1</h1>',
@@ -91,7 +91,7 @@ describe( 'GFMDataProcessor', () => {
 		} );
 
 		it( 'should process headers placed next to each other #1', () => {
-			test(
+			testDataProcessor(
 				'# header\n' +
 				'# header',
 
@@ -100,7 +100,7 @@ describe( 'GFMDataProcessor', () => {
 		} );
 
 		it( 'should process headers placed next to each other #2', () => {
-			test(
+			testDataProcessor(
 				'# header\n' +
 				'## header\n' +
 				'### header',
@@ -110,7 +110,7 @@ describe( 'GFMDataProcessor', () => {
 		} );
 
 		it( 'should process headers followed by a paragraph', () => {
-			test(
+			testDataProcessor(
 				'# header\n\n' +
 				'paragraph',
 

+ 31 - 31
packages/ckeditor5-markdown-gfm/tests/gfmdataprocessor/horizontal-rules.js

@@ -3,7 +3,7 @@
  * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
  */
 
-import { testDataProcessor as test } from '../../tests/_utils/utils';
+import { testDataProcessor } from '../_utils/utils';
 
 describe( 'GFMDataProcessor', () => {
 	// Horizontal rules are are always rendered by GitHub as <hr> and normalized when converting
@@ -11,23 +11,23 @@ describe( 'GFMDataProcessor', () => {
 	describe( 'horizontal rules', () => {
 		describe( 'dashes', () => {
 			it( '#1', () => {
-				test( '---', '<hr></hr>', '* * *' );
+				testDataProcessor( '---', '<hr></hr>', '* * *' );
 			} );
 
 			it( '#2', () => {
-				test( ' ---', '<hr></hr>', '* * *' );
+				testDataProcessor( ' ---', '<hr></hr>', '* * *' );
 			} );
 
 			it( '#3', () => {
-				test( '  ---', '<hr></hr>', '* * *' );
+				testDataProcessor( '  ---', '<hr></hr>', '* * *' );
 			} );
 
 			it( '#4', () => {
-				test( '   ---', '<hr></hr>', '* * *' );
+				testDataProcessor( '   ---', '<hr></hr>', '* * *' );
 			} );
 
 			it( '#5 - code', () => {
-				test(
+				testDataProcessor(
 					'    ---',
 
 					// Four spaces are interpreted as code block.
@@ -43,23 +43,23 @@ describe( 'GFMDataProcessor', () => {
 
 		describe( 'dashes with spaces', () => {
 			it( '#1', () => {
-				test( '- - -', '<hr></hr>', '* * *' );
+				testDataProcessor( '- - -', '<hr></hr>', '* * *' );
 			} );
 
 			it( '#2', () => {
-				test( ' - - -', '<hr></hr>', '* * *' );
+				testDataProcessor( ' - - -', '<hr></hr>', '* * *' );
 			} );
 
 			it( '#3', () => {
-				test( '  - - -', '<hr></hr>', '* * *' );
+				testDataProcessor( '  - - -', '<hr></hr>', '* * *' );
 			} );
 
 			it( '#4', () => {
-				test( '   - - -', '<hr></hr>', '* * *' );
+				testDataProcessor( '   - - -', '<hr></hr>', '* * *' );
 			} );
 
 			it( '#5 - code', () => {
-				test(
+				testDataProcessor(
 					'    - - -',
 
 					// Four spaces are interpreted as code block.
@@ -75,23 +75,23 @@ describe( 'GFMDataProcessor', () => {
 
 		describe( 'asterisks', () => {
 			it( '#1', () => {
-				test( '***', '<hr></hr>', '* * *' );
+				testDataProcessor( '***', '<hr></hr>', '* * *' );
 			} );
 
 			it( '#2', () => {
-				test( ' ***', '<hr></hr>', '* * *' );
+				testDataProcessor( ' ***', '<hr></hr>', '* * *' );
 			} );
 
 			it( '#3', () => {
-				test( '  ***', '<hr></hr>', '* * *' );
+				testDataProcessor( '  ***', '<hr></hr>', '* * *' );
 			} );
 
 			it( '#4', () => {
-				test( '   ***', '<hr></hr>', '* * *' );
+				testDataProcessor( '   ***', '<hr></hr>', '* * *' );
 			} );
 
 			it( '#5 - code', () => {
-				test(
+				testDataProcessor(
 					'    ***',
 
 					// Four spaces are interpreted as code block.
@@ -107,23 +107,23 @@ describe( 'GFMDataProcessor', () => {
 
 		describe( 'asterisks with spaces', () => {
 			it( '#1', () => {
-				test( '* * *', '<hr></hr>', '* * *' );
+				testDataProcessor( '* * *', '<hr></hr>', '* * *' );
 			} );
 
 			it( '#2', () => {
-				test( ' * * *', '<hr></hr>', '* * *' );
+				testDataProcessor( ' * * *', '<hr></hr>', '* * *' );
 			} );
 
 			it( '#3', () => {
-				test( '  * * *', '<hr></hr>', '* * *' );
+				testDataProcessor( '  * * *', '<hr></hr>', '* * *' );
 			} );
 
 			it( '#4', () => {
-				test( '   * * *', '<hr></hr>', '* * *' );
+				testDataProcessor( '   * * *', '<hr></hr>', '* * *' );
 			} );
 
 			it( '#5 - code', () => {
-				test(
+				testDataProcessor(
 					'    * * *',
 
 					// Four spaces are interpreted as code block.
@@ -139,23 +139,23 @@ describe( 'GFMDataProcessor', () => {
 
 		describe( 'underscores', () => {
 			it( '#1', () => {
-				test( '___', '<hr></hr>', '* * *' );
+				testDataProcessor( '___', '<hr></hr>', '* * *' );
 			} );
 
 			it( '#2', () => {
-				test( ' ___', '<hr></hr>', '* * *' );
+				testDataProcessor( ' ___', '<hr></hr>', '* * *' );
 			} );
 
 			it( '#3', () => {
-				test( '  ___', '<hr></hr>', '* * *' );
+				testDataProcessor( '  ___', '<hr></hr>', '* * *' );
 			} );
 
 			it( '#4', () => {
-				test( '   ___', '<hr></hr>', '* * *' );
+				testDataProcessor( '   ___', '<hr></hr>', '* * *' );
 			} );
 
 			it( '#5 - code', () => {
-				test(
+				testDataProcessor(
 					'    ___',
 
 					// Four spaces are interpreted as code block.
@@ -171,23 +171,23 @@ describe( 'GFMDataProcessor', () => {
 
 		describe( 'underscores with spaces', () => {
 			it( '#1', () => {
-				test( '_ _ _', '<hr></hr>', '* * *' );
+				testDataProcessor( '_ _ _', '<hr></hr>', '* * *' );
 			} );
 
 			it( '#2', () => {
-				test( ' _ _ _', '<hr></hr>', '* * *' );
+				testDataProcessor( ' _ _ _', '<hr></hr>', '* * *' );
 			} );
 
 			it( '#3', () => {
-				test( '  _ _ _', '<hr></hr>', '* * *' );
+				testDataProcessor( '  _ _ _', '<hr></hr>', '* * *' );
 			} );
 
 			it( '#4', () => {
-				test( '   _ _ _', '<hr></hr>', '* * *' );
+				testDataProcessor( '   _ _ _', '<hr></hr>', '* * *' );
 			} );
 
 			it( '#5 - code', () => {
-				test(
+				testDataProcessor(
 					'    _ _ _',
 
 					// Four spaces are interpreted as code block.

+ 7 - 7
packages/ckeditor5-markdown-gfm/tests/gfmdataprocessor/images.js

@@ -3,12 +3,12 @@
  * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
  */
 
-import { testDataProcessor as test } from '../../tests/_utils/utils';
+import { testDataProcessor } from '../_utils/utils';
 
 describe( 'GFMDataProcessor', () => {
 	describe( 'images', () => {
 		it( 'should process images', () => {
-			test(
+			testDataProcessor(
 				'![alt text](http://example.com/image.png "title text")',
 
 				// GitHub is rendering as:
@@ -20,21 +20,21 @@ describe( 'GFMDataProcessor', () => {
 		} );
 
 		it( 'should process images without title', () => {
-			test(
+			testDataProcessor(
 				'![alt text](http://example.com/image.png)',
 				'<p><img alt="alt text" src="http://example.com/image.png"></img></p>'
 			);
 		} );
 
 		it( 'should process images without alt text', () => {
-			test(
+			testDataProcessor(
 				'![](http://example.com/image.png "title text")',
 				'<p><img alt="" src="http://example.com/image.png" title="title text"></img></p>'
 			);
 		} );
 
 		it( 'should process referenced images', () => {
-			test(
+			testDataProcessor(
 				'![alt text][logo]\n' +
 				'[logo]: http://example.com/image.png "title text"',
 
@@ -46,7 +46,7 @@ describe( 'GFMDataProcessor', () => {
 		} );
 
 		it( 'should process referenced images without title', () => {
-			test(
+			testDataProcessor(
 				'![alt text][logo]\n' +
 				'[logo]: http://example.com/image.png',
 
@@ -58,7 +58,7 @@ describe( 'GFMDataProcessor', () => {
 		} );
 
 		it( 'should process referenced images without alt text', () => {
-			test(
+			testDataProcessor(
 				'![][logo]\n' +
 				'[logo]: http://example.com/image.png "title text"',
 

+ 41 - 41
packages/ckeditor5-markdown-gfm/tests/gfmdataprocessor/links.js

@@ -3,12 +3,12 @@
  * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
  */
 
-import { testDataProcessor as test } from '../../tests/_utils/utils';
+import { testDataProcessor } from '../_utils/utils';
 
 describe( 'GFMDataProcessor', () => {
 	describe( 'links', () => {
 		it( 'should autolink', () => {
-			test(
+			testDataProcessor(
 				'Link: <http://example.com/>.',
 				'<p>Link: <a href="http://example.com/">http://example.com/</a>.</p>',
 
@@ -18,7 +18,7 @@ describe( 'GFMDataProcessor', () => {
 		} );
 
 		it( 'should autolink #2', () => {
-			test(
+			testDataProcessor(
 				'Link: http://example.com/.',
 				'<p>Link: <a href="http://example.com/">http://example.com/</a>.</p>',
 
@@ -28,7 +28,7 @@ describe( 'GFMDataProcessor', () => {
 		} );
 
 		it( 'should autolink with params', () => {
-			test(
+			testDataProcessor(
 				'Link: <http://example.com/?foo=1&bar=2>.',
 				'<p>Link: <a href="http://example.com/?foo=1&bar=2">http://example.com/?foo=1&bar=2</a>.</p>',
 
@@ -38,7 +38,7 @@ describe( 'GFMDataProcessor', () => {
 		} );
 
 		it( 'should autolink inside list', () => {
-			test(
+			testDataProcessor(
 				'* <http://example.com/>',
 
 				'<ul><li><a href="http://example.com/">http://example.com/</a></li></ul>',
@@ -49,7 +49,7 @@ describe( 'GFMDataProcessor', () => {
 		} );
 
 		it( 'should autolink inside blockquote', () => {
-			test(
+			testDataProcessor(
 				'> Blockquoted: <http://example.com/>',
 
 				'<blockquote>' +
@@ -62,14 +62,14 @@ describe( 'GFMDataProcessor', () => {
 		} );
 
 		it( 'should not autolink inside inline code', () => {
-			test(
+			testDataProcessor(
 				'`<http://example.com/>`',
 				'<p><code><http://example.com/></code></p>'
 			);
 		} );
 
 		it( 'should not autolink inside code block', () => {
-			test(
+			testDataProcessor(
 				'	<http://example.com/>',
 				'<pre><code><http://example.com/></code></pre>',
 
@@ -81,35 +81,35 @@ describe( 'GFMDataProcessor', () => {
 		} );
 
 		it( 'should not process already linked #1', () => {
-			test(
+			testDataProcessor(
 				'Already linked: [http://example.com/](http://example.com/)',
 				'<p>Already linked: <a href="http://example.com/">http://example.com/</a></p>'
 			);
 		} );
 
 		it( 'should not process already linked #2', () => {
-			test(
+			testDataProcessor(
 				'Already linked: [**http://example.com/**](http://example.com/)',
 				'<p>Already linked: <a href="http://example.com/"><strong>http://example.com/</strong></a></p>'
 			);
 		} );
 
 		it( 'should process inline links', () => {
-			test(
+			testDataProcessor(
 				'[URL](/url/)',
 				'<p><a href="/url/">URL</a></p>'
 			);
 		} );
 
 		it( 'should process inline links with title', () => {
-			test(
+			testDataProcessor(
 				'[URL and title](/url/ "title")',
 				'<p><a href="/url/" title="title">URL and title</a></p>'
 			);
 		} );
 
 		it( 'should process inline links with title preceded by two spaces', () => {
-			test(
+			testDataProcessor(
 				'[URL and title](/url/  "title preceded by two spaces")',
 				'<p><a href="/url/" title="title preceded by two spaces">URL and title</a></p>',
 
@@ -119,7 +119,7 @@ describe( 'GFMDataProcessor', () => {
 		} );
 
 		it( 'should process inline links with title preceded by tab', () => {
-			test(
+			testDataProcessor(
 				'[URL and title](/url/	"title preceded by tab")',
 				'<p><a href="/url/" title="title preceded by tab">URL and title</a></p>',
 
@@ -129,7 +129,7 @@ describe( 'GFMDataProcessor', () => {
 		} );
 
 		it( 'should process inline links with title that has spaces afterwards', () => {
-			test(
+			testDataProcessor(
 				'[URL and title](/url/ "title has spaces afterward"  )',
 				'<p><a href="/url/" title="title has spaces afterward">URL and title</a></p>',
 
@@ -139,7 +139,7 @@ describe( 'GFMDataProcessor', () => {
 		} );
 
 		it( 'should process inline links with spaces in URL', () => {
-			test(
+			testDataProcessor(
 				'[URL and title]( /url/has space )',
 				'<p><a href="/url/has space">URL and title</a></p>',
 
@@ -149,7 +149,7 @@ describe( 'GFMDataProcessor', () => {
 		} );
 
 		it( 'should process inline links with titles and spaces in URL', () => {
-			test(
+			testDataProcessor(
 				'[URL and title]( /url/has space/ "url has space and title")',
 				'<p><a href="/url/has space/" title="url has space and title">URL and title</a></p>',
 
@@ -159,7 +159,7 @@ describe( 'GFMDataProcessor', () => {
 		} );
 
 		it( 'should process empty link', () => {
-			test(
+			testDataProcessor(
 				'[Empty]()',
 
 				'<p><a href="">Empty</a></p>'
@@ -167,7 +167,7 @@ describe( 'GFMDataProcessor', () => {
 		} );
 
 		it( 'should process reference links', () => {
-			test(
+			testDataProcessor(
 				'Foo [bar] [1].\n' +
 				'[1]: /url/  "Title"',
 
@@ -180,7 +180,7 @@ describe( 'GFMDataProcessor', () => {
 		} );
 
 		it( 'should process reference links - without space', () => {
-			test(
+			testDataProcessor(
 				'Foo [bar][1].\n' +
 				'[1]: /url/  "Title"',
 
@@ -191,7 +191,7 @@ describe( 'GFMDataProcessor', () => {
 		} );
 
 		it( 'should process reference links - with newline', () => {
-			test(
+			testDataProcessor(
 				'Foo [bar]\n' +
 				'[1].\n' +
 				'[1]: /url/  "Title"',
@@ -203,7 +203,7 @@ describe( 'GFMDataProcessor', () => {
 		} );
 
 		it( 'should process reference links - with embedded brackets', () => {
-			test(
+			testDataProcessor(
 				'With [embedded [brackets]] [b].\n' +
 				'[b]: /url/',
 
@@ -214,7 +214,7 @@ describe( 'GFMDataProcessor', () => {
 		} );
 
 		it( 'should process reference links - with reference indented once', () => {
-			test(
+			testDataProcessor(
 				'Indented [once][].\n' +
 				' [once]: /url',
 
@@ -225,7 +225,7 @@ describe( 'GFMDataProcessor', () => {
 		} );
 
 		it( 'should process reference links - with reference indented twice', () => {
-			test(
+			testDataProcessor(
 				'Indented [twice][].\n' +
 				'  [twice]: /url',
 
@@ -236,7 +236,7 @@ describe( 'GFMDataProcessor', () => {
 		} );
 
 		it( 'should process reference links - with reference indented three times', () => {
-			test(
+			testDataProcessor(
 				'Indented [trice][].\n' +
 				'   [trice]: /url',
 
@@ -247,7 +247,7 @@ describe( 'GFMDataProcessor', () => {
 		} );
 
 		it( 'should NOT process reference links - with reference indented four times', () => {
-			test(
+			testDataProcessor(
 				'Indented [four][].\n' +
 				'    [four]: /url',
 
@@ -266,7 +266,7 @@ describe( 'GFMDataProcessor', () => {
 		} );
 
 		it( 'should process reference links when title and reference are same #1', () => {
-			test(
+			testDataProcessor(
 				'[this] [this]\n' +
 				'[this]: foo',
 
@@ -277,7 +277,7 @@ describe( 'GFMDataProcessor', () => {
 		} );
 
 		it( 'should process reference links when title and reference are same #2', () => {
-			test(
+			testDataProcessor(
 				'[this][this]\n' +
 				'[this]: foo',
 
@@ -288,7 +288,7 @@ describe( 'GFMDataProcessor', () => {
 		} );
 
 		it( 'should process reference links when only title is provided and is same as reference #1', () => {
-			test(
+			testDataProcessor(
 				'[this] []\n' +
 				'[this]: foo',
 
@@ -299,7 +299,7 @@ describe( 'GFMDataProcessor', () => {
 		} );
 
 		it( 'should process reference links when only title is provided and is same as reference #2', () => {
-			test(
+			testDataProcessor(
 				'[this][]\n' +
 				'[this]: foo',
 
@@ -310,7 +310,7 @@ describe( 'GFMDataProcessor', () => {
 		} );
 
 		it( 'should process reference links when only title is provided and is same as reference #3', () => {
-			test(
+			testDataProcessor(
 				'[this]\n' +
 				'[this]: foo',
 
@@ -321,7 +321,7 @@ describe( 'GFMDataProcessor', () => {
 		} );
 
 		it( 'should not process reference links when reference is not found #1', () => {
-			test(
+			testDataProcessor(
 				'[this] []',
 
 				'<p>[this] []</p>'
@@ -329,7 +329,7 @@ describe( 'GFMDataProcessor', () => {
 		} );
 
 		it( 'should not process reference links when reference is not found #2', () => {
-			test(
+			testDataProcessor(
 				'[this][]',
 
 				'<p>[this][]</p>'
@@ -337,7 +337,7 @@ describe( 'GFMDataProcessor', () => {
 		} );
 
 		it( 'should not process reference links when reference is not found #2', () => {
-			test(
+			testDataProcessor(
 				'[this]',
 
 				'<p>[this]</p>'
@@ -345,7 +345,7 @@ describe( 'GFMDataProcessor', () => {
 		} );
 
 		it( 'should process reference links nested in brackets #1', () => {
-			test(
+			testDataProcessor(
 				'[a reference inside [this][]]\n' +
 				'[this]: foo',
 
@@ -356,7 +356,7 @@ describe( 'GFMDataProcessor', () => {
 		} );
 
 		it( 'should process reference links nested in brackets #2', () => {
-			test(
+			testDataProcessor(
 				'[a reference inside [this]]\n' +
 				'[this]: foo',
 
@@ -367,7 +367,7 @@ describe( 'GFMDataProcessor', () => {
 		} );
 
 		it( 'should not process reference links when title is same as reference but reference is different', () => {
-			test(
+			testDataProcessor(
 				'[this](/something/else/)\n' +
 				'[this]: foo',
 
@@ -378,7 +378,7 @@ describe( 'GFMDataProcessor', () => {
 		} );
 
 		it( 'should not process reference links suppressed by backslashes', () => {
-			test(
+			testDataProcessor(
 				'Suppress \\[this] and [this\\].\n' +
 				'[this]: foo',
 
@@ -389,7 +389,7 @@ describe( 'GFMDataProcessor', () => {
 		} );
 
 		it( 'should process reference links when used across multiple lines #1', () => {
-			test(
+			testDataProcessor(
 				'This is [multiline\n' +
 				'reference]\n' +
 				'[multiline reference]: foo',
@@ -402,7 +402,7 @@ describe( 'GFMDataProcessor', () => {
 		} );
 
 		it( 'should process reference links when used across multiple lines #2', () => {
-			test(
+			testDataProcessor(
 				'This is [multiline \n' +
 				'reference]\n' +
 				'[multiline reference]: foo',
@@ -415,7 +415,7 @@ describe( 'GFMDataProcessor', () => {
 		} );
 
 		it( 'should process reference links case-insensitive', () => {
-			test(
+			testDataProcessor(
 				'[hi]\n' +
 				'[HI]: /url',
 

+ 14 - 14
packages/ckeditor5-markdown-gfm/tests/gfmdataprocessor/lists.js

@@ -3,12 +3,12 @@
  * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
  */
 
-import { testDataProcessor as test } from '../../tests/_utils/utils';
+import { testDataProcessor } from '../_utils/utils';
 
 describe( 'GFMDataProcessor', () => {
 	describe( 'lists', () => {
 		it( 'should process tight asterisks', () => {
-			test(
+			testDataProcessor(
 				'*	item 1\n' +
 				'*	item 2\n' +
 				'*	item 3',
@@ -29,7 +29,7 @@ describe( 'GFMDataProcessor', () => {
 		} );
 
 		it( 'should process loose asterisks', () => {
-			test(
+			testDataProcessor(
 				'*	item 1\n' +
 				'\n' +
 				'*	item 2\n' +
@@ -59,7 +59,7 @@ describe( 'GFMDataProcessor', () => {
 		} );
 
 		it( 'should process tight pluses', () => {
-			test(
+			testDataProcessor(
 				'+	item 1\n' +
 				'+	item 2\n' +
 				'+	item 3',
@@ -78,7 +78,7 @@ describe( 'GFMDataProcessor', () => {
 		} );
 
 		it( 'should process loose pluses', () => {
-			test(
+			testDataProcessor(
 				'+	item 1\n' +
 				'\n' +
 				'+	item 2\n' +
@@ -107,7 +107,7 @@ describe( 'GFMDataProcessor', () => {
 		} );
 
 		it( 'should process tight minuses', () => {
-			test(
+			testDataProcessor(
 				'-	item 1\n' +
 				'-	item 2\n' +
 				'-	item 3',
@@ -126,7 +126,7 @@ describe( 'GFMDataProcessor', () => {
 		} );
 
 		it( 'should process loose minuses', () => {
-			test(
+			testDataProcessor(
 				'-	item 1\n' +
 				'\n' +
 				'-	item 2\n' +
@@ -155,7 +155,7 @@ describe( 'GFMDataProcessor', () => {
 		} );
 
 		it( 'should process ordered list with tabs', () => {
-			test(
+			testDataProcessor(
 				'1.	item 1\n' +
 				'2.	item 2\n' +
 				'3.	item 3',
@@ -174,7 +174,7 @@ describe( 'GFMDataProcessor', () => {
 		} );
 
 		it( 'should process ordered list with spaces', () => {
-			test(
+			testDataProcessor(
 				'1. item 1\n' +
 				'2. item 2\n' +
 				'3. item 3',
@@ -193,7 +193,7 @@ describe( 'GFMDataProcessor', () => {
 		} );
 
 		it( 'should process loose ordered list with tabs', () => {
-			test(
+			testDataProcessor(
 				'1.	item 1\n' +
 				'\n' +
 				'2.	item 2\n' +
@@ -222,7 +222,7 @@ describe( 'GFMDataProcessor', () => {
 		} );
 
 		it( 'should process loose ordered list with spaces', () => {
-			test(
+			testDataProcessor(
 				'1. item 1\n' +
 				'\n' +
 				'2. item 2\n' +
@@ -251,7 +251,7 @@ describe( 'GFMDataProcessor', () => {
 		} );
 
 		it( 'should process nested and mixed lists', () => {
-			test(
+			testDataProcessor(
 				'1. First\n' +
 				'2. Second:\n' +
 				'	* Fee\n' +
@@ -282,7 +282,7 @@ describe( 'GFMDataProcessor', () => {
 		} );
 
 		it( 'should process nested and mixed loose lists', () => {
-			test(
+			testDataProcessor(
 				'1. First\n' +
 				'\n' +
 				'2. Second:\n' +
@@ -322,7 +322,7 @@ describe( 'GFMDataProcessor', () => {
 		} );
 
 		it( 'should create same bullet from different list indicators', () => {
-			test(
+			testDataProcessor(
 				'* test\n' +
 				'+ test\n' +
 				'- test',

+ 8 - 8
packages/ckeditor5-markdown-gfm/tests/gfmdataprocessor/paragraphs.js

@@ -3,12 +3,12 @@
  * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
  */
 
-import { testDataProcessor as test } from '../../tests/_utils/utils';
+import { testDataProcessor } from '../_utils/utils';
 
 describe( 'GFMDataProcessor', () => {
 	describe( 'paragraphs', () => {
 		it( 'single line', () => {
-			test(
+			testDataProcessor(
 				'single line paragraph',
 
 				'<p>single line paragraph</p>'
@@ -16,7 +16,7 @@ describe( 'GFMDataProcessor', () => {
 		} );
 
 		it( 'multiline', () => {
-			test(
+			testDataProcessor(
 				'first\n' +
 				'second\n' +
 				'third',
@@ -30,7 +30,7 @@ describe( 'GFMDataProcessor', () => {
 		} );
 
 		it( 'with header after #1', () => {
-			test(
+			testDataProcessor(
 				'single line\n' +
 				'# header',
 
@@ -47,7 +47,7 @@ describe( 'GFMDataProcessor', () => {
 		} );
 
 		it( 'with header after #2', () => {
-			test(
+			testDataProcessor(
 				'single line\n' +
 				'header\n' +
 				'===',
@@ -66,7 +66,7 @@ describe( 'GFMDataProcessor', () => {
 		} );
 
 		it( 'with blockquote after', () => {
-			test(
+			testDataProcessor(
 				'single line' +
 				'\n> quote',
 
@@ -86,7 +86,7 @@ describe( 'GFMDataProcessor', () => {
 		} );
 
 		it( 'with list after', () => {
-			test(
+			testDataProcessor(
 				'single line\n' +
 				'* item',
 
@@ -106,7 +106,7 @@ describe( 'GFMDataProcessor', () => {
 		} );
 
 		it( 'with div element after', () => {
-			test(
+			testDataProcessor(
 				'single line\n' +
 				'<div>div element</div>',
 

+ 3 - 3
packages/ckeditor5-markdown-gfm/tests/gfmdataprocessor/strikethrough.js

@@ -3,12 +3,12 @@
  * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
  */
 
-import { testDataProcessor as test } from '../../tests/_utils/utils';
+import { testDataProcessor } from '../_utils/utils';
 
 describe( 'GFMDataProcessor', () => {
 	describe( 'Strikethrough', () => {
 		it( 'should process strikethrough text', () => {
-			test(
+			testDataProcessor(
 				'~~deleted~~',
 
 				'<p><del>deleted</del></p>'
@@ -16,7 +16,7 @@ describe( 'GFMDataProcessor', () => {
 		} );
 
 		it( 'should process strikethrough inside text', () => {
-			test(
+			testDataProcessor(
 				'This is ~~deleted content~~.',
 
 				'<p>This is <del>deleted content</del>.</p>'

+ 10 - 10
packages/ckeditor5-markdown-gfm/tests/gfmdataprocessor/strong-emphasis.js

@@ -3,12 +3,12 @@
  * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
  */
 
-import { testDataProcessor as test } from '../../tests/_utils/utils';
+import { testDataProcessor } from '../_utils/utils';
 
 describe( 'GFMDataProcessor', () => {
 	describe( 'strong and emphasis', () => {
 		it( 'should process strong', () => {
-			test(
+			testDataProcessor(
 				'**this is strong** and __this too__',
 
 				'<p><strong>this is strong</strong> and <strong>this too</strong></p>',
@@ -19,7 +19,7 @@ describe( 'GFMDataProcessor', () => {
 		} );
 
 		it( 'should process emphasis', () => {
-			test(
+			testDataProcessor(
 				'*this is emphasis* and _this too_',
 
 				'<p><em>this is emphasis</em> and <em>this too</em></p>',
@@ -30,7 +30,7 @@ describe( 'GFMDataProcessor', () => {
 		} );
 
 		it( 'should process strong and emphasis together #1', () => {
-			test(
+			testDataProcessor(
 				'***This is strong and em.***',
 
 				'<p><strong><em>This is strong and em.</em></strong></p>',
@@ -41,7 +41,7 @@ describe( 'GFMDataProcessor', () => {
 		} );
 
 		it( 'should process strong and emphasis together #2', () => {
-			test(
+			testDataProcessor(
 				'Single ***word*** is strong and em.',
 
 				'<p>Single <strong><em>word</em></strong> is strong and em.</p>',
@@ -52,7 +52,7 @@ describe( 'GFMDataProcessor', () => {
 		} );
 
 		it( 'should process strong and emphasis together #3', () => {
-			test(
+			testDataProcessor(
 				'___This is strong and em.___',
 
 				'<p><strong><em>This is strong and em.</em></strong></p>',
@@ -64,7 +64,7 @@ describe( 'GFMDataProcessor', () => {
 		} );
 
 		it( 'should process strong and emphasis together #4', () => {
-			test(
+			testDataProcessor(
 				'Single ___word___ is strong and em.',
 
 				'<p>Single <strong><em>word</em></strong> is strong and em.</p>',
@@ -75,7 +75,7 @@ describe( 'GFMDataProcessor', () => {
 		} );
 
 		it( 'should not process emphasis inside words', () => {
-			test(
+			testDataProcessor(
 				'This should_not_be_emp.',
 
 				'<p>This should_not_be_emp.</p>'
@@ -86,7 +86,7 @@ describe( 'GFMDataProcessor', () => {
 		// it is done on GitHub.
 
 		// it( 'should process nested emphasis #1', () => {
-		// 	test(
+		// 	testDataProcessor(
 		// 		'*test **test** test*',
 		//
 		// 		// GitHub is rendering as:
@@ -96,7 +96,7 @@ describe( 'GFMDataProcessor', () => {
 		// 	);
 		// } );
 		// it( 'should process nested emphasis #2', () => {
-		// 	test(
+		// 	testDataProcessor(
 		// 		'_test __test__ test_',
 		//
 		// 		// GitHub is rendering as:

+ 5 - 5
packages/ckeditor5-markdown-gfm/tests/gfmdataprocessor/tables.js

@@ -3,12 +3,12 @@
  * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
  */
 
-import { testDataProcessor as test } from '../../tests/_utils/utils';
+import { testDataProcessor } from '../_utils/utils';
 
 describe( 'GFMDataProcessor', () => {
 	describe( 'tables', () => {
 		it( 'should process tables', () => {
-			test(
+			testDataProcessor(
 				'| Heading 1 | Heading 2\n' +
 				'| --- | ---\n' +
 				'| Cell 1    | Cell 2\n' +
@@ -42,7 +42,7 @@ describe( 'GFMDataProcessor', () => {
 		} );
 
 		it( 'should process tables with aligned columns', () => {
-			test(
+			testDataProcessor(
 				'| Header 1 | Header 2 | Header 3 | Header 4 |\n' +
 				'| :------: | -------: | :------- | -------- |\n' +
 				'| Cell 1   | Cell 2   | Cell 3   | Cell 4   |\n' +
@@ -82,7 +82,7 @@ describe( 'GFMDataProcessor', () => {
 		} );
 
 		it( 'should process not table without borders', () => {
-			test(
+			testDataProcessor(
 				'Header 1 | Header 2\n' +
 				'-------- | --------\n' +
 				'Cell 1   | Cell 2\n' +
@@ -116,7 +116,7 @@ describe( 'GFMDataProcessor', () => {
 		} );
 
 		it( 'should process formatting inside cells', () => {
-			test(
+			testDataProcessor(
 				'Header 1|Header 2|Header 3|Header 4\n' +
 				':-------|:------:|-------:|--------\n' +
 				'*Cell 1*  |**Cell 2**  |~~Cell 3~~  |Cell 4',

+ 6 - 6
packages/ckeditor5-markdown-gfm/tests/gfmdataprocessor/tabs.js

@@ -3,12 +3,12 @@
  * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
  */
 
-import { testDataProcessor as test } from '../../tests/_utils/utils';
+import { testDataProcessor } from '../_utils/utils';
 
 describe( 'GFMDataProcessor', () => {
 	describe( 'tabs', () => {
 		it( 'should process list item with tabs', () => {
-			test(
+			testDataProcessor(
 				'+	this is a list item indented with tabs',
 
 				// GitHub will render it as (notice two spaces at the beginning of the list item):
@@ -25,7 +25,7 @@ describe( 'GFMDataProcessor', () => {
 		} );
 
 		it( 'should process list item with spaces', () => {
-			test(
+			testDataProcessor(
 				'+   this is a list item indented with spaces',
 
 				// GitHub will render it as (notice two spaces at the beginning of the list item):
@@ -42,7 +42,7 @@ describe( 'GFMDataProcessor', () => {
 		} );
 
 		it( 'should process code block indented by tab', () => {
-			test(
+			testDataProcessor(
 				'	this code block is indented by one tab',
 
 				'<pre><code>this code block is indented by one tab</code></pre>',
@@ -55,7 +55,7 @@ describe( 'GFMDataProcessor', () => {
 		} );
 
 		it( 'should process code block indented by two tabs', () => {
-			test(
+			testDataProcessor(
 				'		this code block is indented by two tabs',
 
 				'<pre><code>    this code block is indented by two tabs</code></pre>',
@@ -68,7 +68,7 @@ describe( 'GFMDataProcessor', () => {
 		} );
 
 		it( 'should process list items indented with tabs as code block', () => {
-			test(
+			testDataProcessor(
 				'	+	list item\n' +
 				'	next line',