ran npm run tester
This commit is contained in:
3
test/arrayToHtmlList/arrayToHtmlList.js
Normal file
3
test/arrayToHtmlList/arrayToHtmlList.js
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
const arrayToHtmlList = (arr, listID) =>
|
||||||
|
arr.map(item => (document.querySelector('#' + listID).innerHTML += `<li>${item}</li>`));
|
||||||
|
module.exports = arrayToHtmlList
|
||||||
13
test/arrayToHtmlList/arrayToHtmlList.test.js
Normal file
13
test/arrayToHtmlList/arrayToHtmlList.test.js
Normal file
@ -0,0 +1,13 @@
|
|||||||
|
const test = require('tape');
|
||||||
|
const arrayToHtmlList = require('./arrayToHtmlList.js');
|
||||||
|
|
||||||
|
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');
|
||||||
|
//t.deepEqual(arrayToHtmlList(args..), 'Expected');
|
||||||
|
//t.equal(arrayToHtmlList(args..), 'Expected');
|
||||||
|
//t.false(arrayToHtmlList(args..), 'Expected');
|
||||||
|
//t.throws(arrayToHtmlList(args..), 'Expected');
|
||||||
|
t.end();
|
||||||
|
});
|
||||||
2
test/hasClass/hasClass.js
Normal file
2
test/hasClass/hasClass.js
Normal file
@ -0,0 +1,2 @@
|
|||||||
|
const hasClass = (el, className) => el.classList.contains(className);
|
||||||
|
module.exports = hasClass
|
||||||
13
test/hasClass/hasClass.test.js
Normal file
13
test/hasClass/hasClass.test.js
Normal file
@ -0,0 +1,13 @@
|
|||||||
|
const test = require('tape');
|
||||||
|
const hasClass = require('./hasClass.js');
|
||||||
|
|
||||||
|
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');
|
||||||
|
//t.deepEqual(hasClass(args..), 'Expected');
|
||||||
|
//t.equal(hasClass(args..), 'Expected');
|
||||||
|
//t.false(hasClass(args..), 'Expected');
|
||||||
|
//t.throws(hasClass(args..), 'Expected');
|
||||||
|
t.end();
|
||||||
|
});
|
||||||
16
test/testlog
16
test/testlog
@ -1,4 +1,4 @@
|
|||||||
Test log for: Sat Jan 27 2018 11:05:08 GMT-0500 (Eastern Standard Time)
|
Test log for: Sun Jan 28 2018 14:42:53 GMT-0500 (Eastern Standard Time)
|
||||||
|
|
||||||
> 30-seconds-of-code@0.0.1 test C:\Users\King David\Desktop\github-repo\30-seconds-of-code
|
> 30-seconds-of-code@0.0.1 test C:\Users\King David\Desktop\github-repo\30-seconds-of-code
|
||||||
> tape test/**/*.test.js | tap-spec
|
> tape test/**/*.test.js | tap-spec
|
||||||
@ -9,6 +9,10 @@ Test log for: Sat Jan 27 2018 11:05:08 GMT-0500 (Eastern Standard Time)
|
|||||||
√ anagrams is a Function
|
√ anagrams is a Function
|
||||||
√ Generates all anagrams of a string
|
√ Generates all anagrams of a string
|
||||||
|
|
||||||
|
Testing arrayToHtmlList
|
||||||
|
|
||||||
|
√ arrayToHtmlList is a Function
|
||||||
|
|
||||||
Testing ary
|
Testing ary
|
||||||
|
|
||||||
√ ary is a Function
|
√ ary is a Function
|
||||||
@ -453,6 +457,10 @@ Test log for: Sat Jan 27 2018 11:05:08 GMT-0500 (Eastern Standard Time)
|
|||||||
√ hammingDistance is a Function
|
√ hammingDistance is a Function
|
||||||
√ retuns hamming disance between 2 values
|
√ retuns hamming disance between 2 values
|
||||||
|
|
||||||
|
Testing hasClass
|
||||||
|
|
||||||
|
√ hasClass is a Function
|
||||||
|
|
||||||
Testing hasFlags
|
Testing hasFlags
|
||||||
|
|
||||||
√ hasFlags is a Function
|
√ hasFlags is a Function
|
||||||
@ -1513,8 +1521,8 @@ Test log for: Sat Jan 27 2018 11:05:08 GMT-0500 (Eastern Standard Time)
|
|||||||
√ zipWith is a Function
|
√ zipWith is a Function
|
||||||
|
|
||||||
|
|
||||||
total: 647
|
total: 649
|
||||||
passing: 647
|
passing: 649
|
||||||
duration: 576ms
|
duration: 499ms
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user