ran npm run tester

This commit is contained in:
King
2018-01-28 14:43:35 -05:00
parent 31076c2749
commit 74bbd30419
5 changed files with 43 additions and 4 deletions

View File

@ -0,0 +1,3 @@
const arrayToHtmlList = (arr, listID) =>
arr.map(item => (document.querySelector('#' + listID).innerHTML += `<li>${item}</li>`));
module.exports = arrayToHtmlList

View 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();
});

View File

@ -0,0 +1,2 @@
const hasClass = (el, className) => el.classList.contains(className);
module.exports = hasClass

View 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();
});

View File

@ -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
> 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
√ Generates all anagrams of a string
Testing arrayToHtmlList
√ arrayToHtmlList is a Function
Testing ary
√ 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
√ retuns hamming disance between 2 values
Testing hasClass
√ hasClass is a Function
Testing hasFlags
√ 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
total: 647
passing: 647
duration: 576ms
total: 649
passing: 649
duration: 499ms