Skip to content
This repository has been archived by the owner on Feb 17, 2021. It is now read-only.

Commit

Permalink
test: add test for merge function
Browse files Browse the repository at this point in the history
  • Loading branch information
mg901 committed Nov 5, 2019
1 parent 531a4ac commit bb910f7
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions src/test/utils.spec.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
const { deepObjectValues, flatten, invariant } = require('../utils');

const {
merge,
omit,
percentage,
toPx,
toEm,
Expand All @@ -13,6 +15,18 @@ const {
isValidStep,
} = require('../utils');

describe('merge', () => {
it('merge all transfered objects', () => {
expect(merge({ a: 1 }, { b: 2 }, { c: 3 })).toEqual({ a: 1, b: 2, c: 3 });
});
});

describe('omit', () => {
it('return object without a parameter passed', () => {
expect(omit('a', { a: 1, b: 2 })).toEqual({ b: 2 });
});
});

describe('deepObjectValues', () => {
it('return an array of a values from the object', () => {
const config = {
Expand Down

0 comments on commit bb910f7

Please sign in to comment.