diff --git a/test/fileFunction.test.js b/test/fileFunction.test.js index a7771bc..c1b168d 100644 --- a/test/fileFunction.test.js +++ b/test/fileFunction.test.js @@ -20,6 +20,13 @@ ff.markdownToHTML('test/markdownTest.md', 'It').then(html => { }); }); +it('TEXT to HTML renders correctly', () => { +ff.textToHTML('test/testing.txt').then(html => { + const tree = ReactTestRenderer.create(html).toJSON(); + expect(tree).toBeTruthy(); + }); +}); + test('Checks if it lineChecker filter without first line', () => { expect(ff.lineChecker('Hello World', false)).toBe('
Hello World
'); }); diff --git a/test/testing.txt b/test/testing.txt new file mode 100644 index 0000000..95d09f2 --- /dev/null +++ b/test/testing.txt @@ -0,0 +1 @@ +hello world \ No newline at end of file diff --git a/yarn.lock b/yarn.lock index 1103cc1..d5ca33f 100644 --- a/yarn.lock +++ b/yarn.lock @@ -1583,11 +1583,6 @@ "resolved" "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz" "version" "1.0.0" -"fsevents@^2.3.2": - "integrity" "sha512-xiqMQR4xAeHTuB9uWm+fFRcIOgKBMiOBP+eXiyT7jsgVCq1bkVygt00oASowB7EdtpOHaaPgKt812P9ab+DDKA==" - "resolved" "https://registry.npmjs.org/fsevents/-/fsevents-2.3.2.tgz" - "version" "2.3.2" - "function-bind@^1.1.1": "integrity" "sha512-yIovAzMX49sF8Yl58fSCWJ5svSLuaibPxXQJFLmBObTuCr0Mf1KiPopGM9NiFjiYBCbfaa2Fh6breQ6ANVTI0A==" "resolved" "https://registry.npmjs.org/function-bind/-/function-bind-1.1.1.tgz"