From eb70e6e3d0bff11c25f14b1196025791bf2308fb Mon Sep 17 00:00:00 2001 From: "Matt A. Tobin" Date: Tue, 25 Feb 2020 15:07:00 -0500 Subject: Issue #439 - Remove tests from toolkit/ --- .../microformats/test/module-tests/text-test.js | 56 ---------------------- 1 file changed, 56 deletions(-) delete mode 100644 toolkit/components/microformats/test/module-tests/text-test.js (limited to 'toolkit/components/microformats/test/module-tests/text-test.js') diff --git a/toolkit/components/microformats/test/module-tests/text-test.js b/toolkit/components/microformats/test/module-tests/text-test.js deleted file mode 100644 index f1f2e775c..000000000 --- a/toolkit/components/microformats/test/module-tests/text-test.js +++ /dev/null @@ -1,56 +0,0 @@ -/* -Unit test for text -*/ - -assert = chai.assert; - -// Tests the private Modules.text object -// Modules.text is unit tested as it has an interface access by other modules - - -describe('Modules.text', function() { - - - it('parse', function(){ - var html = '\n Glenn\n Jones \n \n', - node = document.createElement('div'); - - node.innerHTML = html; - assert.equal( Modules.text.parse( document, node, 'whitespacetrimmed' ), 'Glenn\n Jones' ); - assert.equal( Modules.text.parse( document, node, 'whitespace' ), '\n Glenn\n Jones \n \n' ); - assert.equal( Modules.text.parse( document, node, 'normalised' ), 'Glenn Jones' ); - - // exclude tags - node.innerHTML = 'text'; - assert.equal( Modules.text.parse( document, node, 'normalised' ), 'text' ); - - // block level - node.innerHTML = '

test

text'; - //assert.equal( Modules.text.parse( document, node, 'normalised' ), 'test text' ); - - // node with no text data - node = document.createComment('test comment'); - assert.equal( Modules.text.parse( document, node, 'normalised' ), '' ); - - }); - - - it('parseText', function(){ - var text = '\n Glenn\n Jones \n \n'; - - // create DOM context first - Modules.domUtils.getDOMContext( {} ); - - assert.equal( Modules.text.parseText( document, text, 'whitespacetrimmed' ), 'Glenn\n Jones' ); - assert.equal( Modules.text.parseText( document, text, 'whitespace' ), '\n Glenn\n Jones \n \n' ); - assert.equal( Modules.text.parseText( document, text, 'normalised' ), 'Glenn Jones' ); - }); - - - it('formatText', function(){ - assert.equal( Modules.text.formatText( document, null, 'whitespacetrimmed' ), '' ); - }); - - - -}); -- cgit v1.2.3