Travis build: 1323 [cron]

This commit is contained in:
30secondsofcode
2018-01-19 20:10:17 +00:00
parent 17abe97036
commit ad0bcbd70a
20 changed files with 309 additions and 96 deletions

View File

@ -0,0 +1,2 @@
const defaults = (obj, ...defs) => Object.assign({}, obj, ...defs.reverse(), obj);
module.exports = defaults

View File

@ -0,0 +1,13 @@
const test = require('tape');
const defaults = require('./defaults.js');
test('Testing defaults', (t) => {
//For more information on all the methods supported by tape
//Please go to https://github.com/substack/tape
t.true(typeof defaults === 'function', 'defaults is a Function');
//t.deepEqual(defaults(args..), 'Expected');
//t.equal(defaults(args..), 'Expected');
//t.false(defaults(args..), 'Expected');
//t.throws(defaults(args..), 'Expected');
t.end();
});

2
test/forOwn/forOwn.js Normal file
View File

@ -0,0 +1,2 @@
const forOwn = (obj, fn) => Object.keys(obj).forEach(key => fn(obj[key], key, obj));
module.exports = forOwn

View File

@ -0,0 +1,13 @@
const test = require('tape');
const forOwn = require('./forOwn.js');
test('Testing forOwn', (t) => {
//For more information on all the methods supported by tape
//Please go to https://github.com/substack/tape
t.true(typeof forOwn === 'function', 'forOwn is a Function');
//t.deepEqual(forOwn(args..), 'Expected');
//t.equal(forOwn(args..), 'Expected');
//t.false(forOwn(args..), 'Expected');
//t.throws(forOwn(args..), 'Expected');
t.end();
});

View File

@ -0,0 +1,5 @@
const forOwnRight = (obj, fn) =>
Object.keys(obj)
.reverse()
.forEach(key => fn(obj[key], key, obj));
module.exports = forOwnRight

View File

@ -0,0 +1,13 @@
const test = require('tape');
const forOwnRight = require('./forOwnRight.js');
test('Testing forOwnRight', (t) => {
//For more information on all the methods supported by tape
//Please go to https://github.com/substack/tape
t.true(typeof forOwnRight === 'function', 'forOwnRight is a Function');
//t.deepEqual(forOwnRight(args..), 'Expected');
//t.equal(forOwnRight(args..), 'Expected');
//t.false(forOwnRight(args..), 'Expected');
//t.throws(forOwnRight(args..), 'Expected');
t.end();
});

View File

@ -0,0 +1,2 @@
const isPlainObject = val => !!val && typeof val === 'object' && val.constructor === Object;
module.exports = isPlainObject

View File

@ -0,0 +1,13 @@
const test = require('tape');
const isPlainObject = require('./isPlainObject.js');
test('Testing isPlainObject', (t) => {
//For more information on all the methods supported by tape
//Please go to https://github.com/substack/tape
t.true(typeof isPlainObject === 'function', 'isPlainObject is a Function');
//t.deepEqual(isPlainObject(args..), 'Expected');
//t.equal(isPlainObject(args..), 'Expected');
//t.false(isPlainObject(args..), 'Expected');
//t.throws(isPlainObject(args..), 'Expected');
t.end();
});

5
test/omit/omit.js Normal file
View File

@ -0,0 +1,5 @@
const omit = (obj, arr) =>
Object.keys(obj)
.filter(k => !arr.includes(k))
.reduce((acc, key) => ((acc[key] = obj[key]), acc), {});
module.exports = omit

13
test/omit/omit.test.js Normal file
View File

@ -0,0 +1,13 @@
const test = require('tape');
const omit = require('./omit.js');
test('Testing omit', (t) => {
//For more information on all the methods supported by tape
//Please go to https://github.com/substack/tape
t.true(typeof omit === 'function', 'omit is a Function');
//t.deepEqual(omit(args..), 'Expected');
//t.equal(omit(args..), 'Expected');
//t.false(omit(args..), 'Expected');
//t.throws(omit(args..), 'Expected');
t.end();
});

5
test/omitBy/omitBy.js Normal file
View File

@ -0,0 +1,5 @@
const omitBy = (obj, fn) =>
Object.keys(obj)
.filter(k => !fn(obj[k], k))
.reduce((acc, key) => ((acc[key] = obj[key]), acc), {});
module.exports = omitBy

View File

@ -0,0 +1,13 @@
const test = require('tape');
const omitBy = require('./omitBy.js');
test('Testing omitBy', (t) => {
//For more information on all the methods supported by tape
//Please go to https://github.com/substack/tape
t.true(typeof omitBy === 'function', 'omitBy is a Function');
//t.deepEqual(omitBy(args..), 'Expected');
//t.equal(omitBy(args..), 'Expected');
//t.false(omitBy(args..), 'Expected');
//t.throws(omitBy(args..), 'Expected');
t.end();
});

5
test/pickBy/pickBy.js Normal file
View File

@ -0,0 +1,5 @@
const pickBy = (obj, fn) =>
Object.keys(obj)
.filter(k => fn(obj[k], k))
.reduce((acc, key) => ((acc[key] = obj[key]), acc), {});
module.exports = pickBy

View File

@ -0,0 +1,13 @@
const test = require('tape');
const pickBy = require('./pickBy.js');
test('Testing pickBy', (t) => {
//For more information on all the methods supported by tape
//Please go to https://github.com/substack/tape
t.true(typeof pickBy === 'function', 'pickBy is a Function');
//t.deepEqual(pickBy(args..), 'Expected');
//t.equal(pickBy(args..), 'Expected');
//t.false(pickBy(args..), 'Expected');
//t.throws(pickBy(args..), 'Expected');
t.end();
});

View File

@ -1,4 +1,4 @@
Test log for: Thu Jan 18 2018 20:09:23 GMT+0000 (UTC)
Test log for: Fri Jan 19 2018 20:10:14 GMT+0000 (UTC)
> 30-seconds-of-code@0.0.1 test /home/travis/build/Chalarangelo/30-seconds-of-code
> tape test/**/*.test.js | tap-spec
@ -205,6 +205,10 @@ Test log for: Thu Jan 18 2018 20:09:23 GMT+0000 (UTC)
✔ deepFlatten is a Function
✔ Deep flattens an array
Testing defaults
✔ defaults is a Function
Testing defer
✔ defer is a Function
@ -334,6 +338,14 @@ Test log for: Thu Jan 18 2018 20:09:23 GMT+0000 (UTC)
✔ forEachRight is a Function
Testing forOwn
✔ forOwn is a Function
Testing forOwnRight
✔ forOwnRight is a Function
Testing formatDuration
✔ formatDuration is a Function
@ -605,6 +617,10 @@ Test log for: Thu Jan 18 2018 20:09:23 GMT+0000 (UTC)
✔ isObject({ a:1 }) is a object
✔ isObject(true) is not a object
Testing isPlainObject
✔ isPlainObject is a Function
Testing isPrime
✔ isPrime is a Function
@ -816,6 +832,14 @@ Test log for: Thu Jan 18 2018 20:09:23 GMT+0000 (UTC)
✔ off is a Function
Testing omit
✔ omit is a Function
Testing omitBy
✔ omitBy is a Function
Testing on
✔ on is a Function
@ -859,6 +883,10 @@ Test log for: Thu Jan 18 2018 20:09:23 GMT+0000 (UTC)
✔ pick is a Function
✔ Picks the key-value pairs corresponding to the given keys from an object.
Testing pickBy
✔ pickBy is a Function
Testing pipeFunctions
✔ pipeFunctions is a Function
@ -1269,8 +1297,8 @@ Test log for: Thu Jan 18 2018 20:09:23 GMT+0000 (UTC)
✔ zipObject(test, string) throws an error
total: 556
passing: 556
duration: 307ms
total: 563
passing: 563
duration: 311ms