summaryrefslogtreecommitdiffstats
path: root/toolkit/components/microformats/test/interface-tests/isMicroformat-test.js
diff options
context:
space:
mode:
authorMatt A. Tobin <email@mattatobin.com>2020-02-25 15:07:00 -0500
committerMatt A. Tobin <email@mattatobin.com>2020-02-25 15:07:00 -0500
commit0ddd00f1959c78ce37c14fef3c83401408fca3bf (patch)
treed408e02767c86cf8aac3acbb86722b03c77ede6f /toolkit/components/microformats/test/interface-tests/isMicroformat-test.js
parent20f0905b33cbb18d1caa80c55e2f552c2e18957b (diff)
downloadUXP-0ddd00f1959c78ce37c14fef3c83401408fca3bf.tar
UXP-0ddd00f1959c78ce37c14fef3c83401408fca3bf.tar.gz
UXP-0ddd00f1959c78ce37c14fef3c83401408fca3bf.tar.lz
UXP-0ddd00f1959c78ce37c14fef3c83401408fca3bf.tar.xz
UXP-0ddd00f1959c78ce37c14fef3c83401408fca3bf.zip
Issue #439 - Remove tests from toolkit/
Diffstat (limited to 'toolkit/components/microformats/test/interface-tests/isMicroformat-test.js')
-rw-r--r--toolkit/components/microformats/test/interface-tests/isMicroformat-test.js146
1 files changed, 0 insertions, 146 deletions
diff --git a/toolkit/components/microformats/test/interface-tests/isMicroformat-test.js b/toolkit/components/microformats/test/interface-tests/isMicroformat-test.js
deleted file mode 100644
index 7081b2880..000000000
--- a/toolkit/components/microformats/test/interface-tests/isMicroformat-test.js
+++ /dev/null
@@ -1,146 +0,0 @@
-/*
-Unit test for isMicroformat
-*/
-
-assert = chai.assert;
-
-
-describe('Microformat.isMicroformat', function() {
-
- it('true - v2', function(){
-
- var doc,
- node;
-
- var html = '<a class="h-card" href="http://glennjones.net"><span class="p-name">Glenn</span></a>';
-
- doc = document.implementation.createHTMLDocument('New Document');
- node = document.createElement('div');
- doc.body.appendChild( node );
- node.innerHTML = html;
- node = doc.querySelector( 'a' );
-
- assert.isTrue( Microformats.isMicroformat( node ) );
-
- });
-
-
- it('true - v1', function(){
-
- var doc,
- node;
-
- var html = '<a class="vcard" href="http://glennjones.net"><span class="fn">Glenn</span></a>';
-
- doc = document.implementation.createHTMLDocument('New Document');
- node = document.createElement('div');
- doc.body.appendChild( node );
- node.innerHTML = html;
- node = doc.querySelector( 'a' );
-
- assert.isTrue( Microformats.isMicroformat( node ) );
-
- });
-
-
- it('true - v2 filter', function(){
-
- var doc,
- node;
-
- var html = '<a class="h-card" href="http://glennjones.net"><span class="p-name">Glenn</span></a>';
-
- doc = document.implementation.createHTMLDocument('New Document');
- node = document.createElement('div');
- doc.body.appendChild( node );
- node.innerHTML = html;
- node = doc.querySelector( 'a' );
-
- assert.isTrue( Microformats.isMicroformat( node, {'filters': ['h-card']} ) );
-
- });
-
-
- it('true - v1 filter', function(){
-
- var doc,
- node;
-
- var html = '<a class="vcard" href="http://glennjones.net"><span class="fn">Glenn</span></a>';
-
- doc = document.implementation.createHTMLDocument('New Document');
- node = document.createElement('div');
- doc.body.appendChild( node );
- node.innerHTML = html;
- node = doc.querySelector( 'a' );
-
- assert.isTrue( Microformats.isMicroformat( node, {'filters': ['h-card']} ) );
-
- });
-
-
- it('false - v2 filter', function(){
-
- var doc,
- node;
-
- var html = '<a class="h-card" href="http://glennjones.net"><span class="p-name">Glenn</span></a>';
-
- doc = document.implementation.createHTMLDocument('New Document');
- node = document.createElement('div');
- doc.body.appendChild( node );
- node.innerHTML = html;
- node = doc.querySelector( 'a' );
-
- assert.isFalse( Microformats.isMicroformat( node, {'filters': ['h-entry']} ) );
-
- });
-
-
-
- it('false - property', function(){
-
- var doc,
- node;
-
- var html = '<span class="p-name">Glenn</span>';
-
- doc = document.implementation.createHTMLDocument('New Document');
- node = document.createElement('div');
- doc.body.appendChild( node );
- node.innerHTML = html;
- node = doc.querySelector( 'span' );
-
- assert.isFalse( Microformats.isMicroformat( node ) );
-
- });
-
-
- it('false - no class', function(){
-
- var doc,
- node;
-
- var html = '<span>Glenn</span>';
-
- doc = document.implementation.createHTMLDocument('New Document');
- node = document.createElement('div');
- doc.body.appendChild( node );
- node.innerHTML = html;
- node = doc.querySelector( 'span' );
-
- assert.isFalse( Microformats.isMicroformat( node ) );
-
- });
-
-
- it('false - no node', function(){
- assert.isFalse( Microformats.isMicroformat( ) );
- });
-
-
- it('false - undefined node', function(){
- assert.isFalse( Microformats.isMicroformat( undefined ) );
- });
-
- });