deap.test.js
1.39 KB
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
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
var assert = require('chai').assert,
deap = require('../index'),
lib = require('../lib/deap');
describe('deap', function() {
it('should have clone defined', function() {
assert.isFunction(deap.clone);
assert.deepEqual(deap.clone, lib.clone);
});
it('should have cloneShallow defined', function() {
assert.isFunction(deap.cloneShallow);
assert.deepEqual(deap.cloneShallow, lib.cloneShallow);
});
it('should have extend exposed as a top level function', function() {
assert.isFunction(deap);
assert.equal(deap, lib.extend);
});
it('should have extend defined', function() {
assert.isFunction(deap.extend);
assert.deepEqual(deap.extend, lib.extend);
});
it('should have extendShallow defined', function() {
assert.isFunction(deap.extendShallow);
assert.deepEqual(deap.extendShallow, lib.extendShallow);
});
it('should have update defined', function() {
assert.isFunction(deap.update);
assert.deepEqual(deap.update, lib.update);
});
it('should have updateShallow defined', function() {
assert.isFunction(deap.updateShallow);
assert.deepEqual(deap.updateShallow, lib.updateShallow);
});
it('should have merge defined', function() {
assert.isFunction(deap.merge);
assert.deepEqual(deap.merge, lib.merge);
});
it('should have mergeShallow defined', function() {
assert.isFunction(deap.mergeShallow);
assert.deepEqual(deap.mergeShallow, lib.mergeShallow);
});
});