Travis build: 1953 [cron]
This commit is contained in:
367
docs/index.html
367
docs/index.html
File diff suppressed because one or more lines are too long
6
test/hz/hz.js
Normal file
6
test/hz/hz.js
Normal file
@ -0,0 +1,6 @@
|
||||
const hz = (fn, iterations = 100) => {
|
||||
const before = performance.now();
|
||||
for (let i = 0; i < iterations; i++) fn();
|
||||
return 1000 * iterations / (performance.now() - before);
|
||||
};
|
||||
module.exports = hz;
|
||||
13
test/hz/hz.test.js
Normal file
13
test/hz/hz.test.js
Normal file
@ -0,0 +1,13 @@
|
||||
const test = require('tape');
|
||||
const hz = require('./hz.js');
|
||||
|
||||
test('Testing hz', (t) => {
|
||||
//For more information on all the methods supported by tape
|
||||
//Please go to https://github.com/substack/tape
|
||||
t.true(typeof hz === 'function', 'hz is a Function');
|
||||
//t.deepEqual(hz(args..), 'Expected');
|
||||
//t.equal(hz(args..), 'Expected');
|
||||
//t.false(hz(args..), 'Expected');
|
||||
//t.throws(hz(args..), 'Expected');
|
||||
t.end();
|
||||
});
|
||||
@ -1,2 +1,2 @@
|
||||
const is = (type, val) => val instanceof type;
|
||||
const is = (type, val) => ![, null].includes(val) && val.constructor === type;
|
||||
module.exports = is;
|
||||
@ -1,7 +1,9 @@
|
||||
const renameKeys = (keysMap, obj) => Object
|
||||
.keys(obj)
|
||||
.reduce((acc, key) => ({
|
||||
const renameKeys = (keysMap, obj) =>
|
||||
Object.keys(obj).reduce(
|
||||
(acc, key) => ({
|
||||
...acc,
|
||||
...{ [keysMap[key] || key]: obj[key] }
|
||||
}), {});
|
||||
module.exports = renameKeys;
|
||||
}),
|
||||
{}
|
||||
);
|
||||
module.exports = renameKeys;
|
||||
59
test/testlog
59
test/testlog
@ -1,4 +1,4 @@
|
||||
Test log for: Wed Apr 11 2018 20:51:38 GMT+0000 (UTC)
|
||||
Test log for: Thu Apr 12 2018 20:52:44 GMT+0000 (UTC)
|
||||
|
||||
> 30-seconds-of-code@0.0.3 test /home/travis/build/Chalarangelo/30-seconds-of-code
|
||||
> tape test/**/*.test.js | tap-spec
|
||||
@ -691,6 +691,10 @@ Test log for: Wed Apr 11 2018 20:51:38 GMT+0000 (UTC)
|
||||
✔ httpsRedirect is a Function
|
||||
✔ Tested on 09/02/2018 by @chalarangelo
|
||||
|
||||
Testing hz
|
||||
|
||||
✔ hz is a Function
|
||||
|
||||
Testing inRange
|
||||
|
||||
✔ inRange is a Function
|
||||
@ -762,11 +766,35 @@ Test log for: Wed Apr 11 2018 20:51:38 GMT+0000 (UTC)
|
||||
✔ Works for sets
|
||||
✔ Works for weak maps
|
||||
✔ Works for weak sets
|
||||
✔ Works for strings - returns false for primitive
|
||||
|
||||
✖ Works for strings - returns false for primitive
|
||||
--------------------------------------------------
|
||||
operator: notOk
|
||||
expected: false
|
||||
actual: true
|
||||
at: Test.test (/home/travis/build/Chalarangelo/30-seconds-of-code/test/is/is.test.js:17:10)
|
||||
stack: |-
|
||||
|
||||
✔ Works for strings - returns true when using constructor
|
||||
✔ Works for numbers - returns false for primitive
|
||||
|
||||
✖ Works for numbers - returns false for primitive
|
||||
--------------------------------------------------
|
||||
operator: notOk
|
||||
expected: false
|
||||
actual: true
|
||||
at: Test.test (/home/travis/build/Chalarangelo/30-seconds-of-code/test/is/is.test.js:19:10)
|
||||
stack: |-
|
||||
|
||||
✔ Works for numbers - returns true when using constructor
|
||||
✔ Works for booleans - returns false for primitive
|
||||
|
||||
✖ Works for booleans - returns false for primitive
|
||||
---------------------------------------------------
|
||||
operator: notOk
|
||||
expected: false
|
||||
actual: true
|
||||
at: Test.test (/home/travis/build/Chalarangelo/30-seconds-of-code/test/is/is.test.js:21:10)
|
||||
stack: |-
|
||||
|
||||
✔ Works for booleans - returns true when using constructor
|
||||
✔ Works for functions
|
||||
|
||||
@ -1448,6 +1476,11 @@ Test log for: Wed Apr 11 2018 20:51:38 GMT+0000 (UTC)
|
||||
|
||||
✔ removeVowels is a Function
|
||||
|
||||
Testing renameKeys
|
||||
|
||||
✔ renameKeys is a Function
|
||||
✔ should be equivalent
|
||||
|
||||
Testing reverseString
|
||||
|
||||
✔ reverseString is a Function
|
||||
@ -1970,15 +2003,27 @@ Test log for: Wed Apr 11 2018 20:51:38 GMT+0000 (UTC)
|
||||
|
||||
✔ zipWith is a Function
|
||||
✔ Sends a GET request
|
||||
✔ Sends a POST request
|
||||
✔ Runs the function provided
|
||||
✔ Sends a POST request
|
||||
✔ Runs promises in series
|
||||
✔ Works as expecting, passing arguments properly
|
||||
✔ Works with multiple promises
|
||||
|
||||
|
||||
total: 1006
|
||||
|
||||
Failed Tests: There were 3 failures
|
||||
|
||||
Testing is
|
||||
|
||||
✖ Works for strings - returns false for primitive
|
||||
✖ Works for numbers - returns false for primitive
|
||||
✖ Works for booleans - returns false for primitive
|
||||
|
||||
|
||||
total: 1009
|
||||
passing: 1006
|
||||
duration: 2.4s
|
||||
failing: 3
|
||||
duration: 2.5s
|
||||
|
||||
|
||||
undefined
|
||||
Reference in New Issue
Block a user