delete the following folder in test dir hasClass and arrayToHtmlList
This commit is contained in:
@ -1,3 +0,0 @@
|
||||
const arrayToHtmlList = (arr, listID) =>
|
||||
arr.map(item => (document.querySelector('#' + listID).innerHTML += `<li>${item}</li>`));
|
||||
module.exports = arrayToHtmlList
|
||||
@ -1,22 +0,0 @@
|
||||
// const test = require('tape');
|
||||
// //const arrayToHtmlList = require('./arrayToHtmlList.js');
|
||||
// const jsdom = require('jsdom');
|
||||
// const { JSDOM } = jsdom;
|
||||
// const listID = 'myListID';
|
||||
// const dom = new JSDOM(`<ul id="${listID}"></ul>`);
|
||||
// // Override snippet to use jsdom
|
||||
// const arrayToHtmlList = (arr, listID) =>
|
||||
// arr.map(item => (dom.window.document.querySelector('#' + listID).innerHTML += `<li>${item}</li>`));
|
||||
//
|
||||
// test('Testing arrayToHtmlList', (t) => {
|
||||
// //For more information on all the methods supported by tape
|
||||
// //Please go to https://github.com/substack/tape
|
||||
// t.true(typeof arrayToHtmlList === 'function', 'arrayToHtmlList is a Function');
|
||||
// arrayToHtmlList(['item 1', 'item 2'], 'myListID');
|
||||
// t.equals(dom.window.document.querySelector(`ul#${listID}`).innerHTML, '<li>item 1</li><li>item 2</li>', 'Generates and fills a list element');
|
||||
// //t.deepEqual(arrayToHtmlList(args..), 'Expected');
|
||||
// //t.equal(arrayToHtmlList(args..), 'Expected');
|
||||
// //t.false(arrayToHtmlList(args..), 'Expected');
|
||||
// //t.throws(arrayToHtmlList(args..), 'Expected');
|
||||
// t.end();
|
||||
// });
|
||||
@ -1,2 +0,0 @@
|
||||
const hasClass = (el, className) => el.classList.contains(className);
|
||||
module.exports = hasClass
|
||||
@ -1,20 +0,0 @@
|
||||
// const test = require('tape');
|
||||
// const hasClass = require('./hasClass.js');
|
||||
// const jsdom = require('jsdom');
|
||||
// const { JSDOM } = jsdom;
|
||||
//
|
||||
// test('Testing hasClass', (t) => {
|
||||
// //For more information on all the methods supported by tape
|
||||
// //Please go to https://github.com/substack/tape
|
||||
// t.true(typeof hasClass === 'function', 'hasClass is a Function');
|
||||
// const className = 'container'
|
||||
// const dom = new JSDOM(`
|
||||
// <p class="${className}">Some text</p>
|
||||
// `);
|
||||
// t.true(hasClass(dom.window.document.querySelector('p'), className), 'element has the specified class');
|
||||
// //t.deepEqual(hasClass(args..), 'Expected');
|
||||
// //t.equal(hasClass(args..), 'Expected');
|
||||
// //t.false(hasClass(args..), 'Expected');
|
||||
// //t.throws(hasClass(args..), 'Expected');
|
||||
// t.end();
|
||||
// });
|
||||
Reference in New Issue
Block a user