forked from lexich/redux-api
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathomit_spec.js
More file actions
31 lines (29 loc) · 959 Bytes
/
Copy pathomit_spec.js
File metadata and controls
31 lines (29 loc) · 959 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
"use strict";
/* global describe, it */
/* eslint import/no-extraneous-dependencies: ["error", {"devDependencies": true}] */
import { expect } from "chai";
import omit from "../src/utils/omit";
describe("omit", function() {
it("check without params", function() {
const object = { a: 1, b: 2, c: 3 };
const result = omit(object);
expect(result).to.eql(object);
expect(result !== object).to.be.true;
});
it("check without params", function() {
const object = { a: 1, b: 2, c: 3 };
const result = omit(object, []);
expect(result).to.eql(object);
expect(result !== object).to.be.true;
});
it("check omit", function() {
const object = { a: 1, b: 2, c: 3 };
const result = omit(object, ["a", "b"]);
expect(result).to.eql({ c: 3 });
});
it("check omit", function() {
const object = { a: 1, b: 2, c: 3 };
const result = omit(object, ["a", "b", "d"]);
expect(result).to.eql({ c: 3 });
});
});