1 | 'use strict';
|
2 |
|
3 | var test = require('../');
|
4 |
|
5 | test('deep strict equal', function (t) {
|
6 | t.notDeepEqual(
|
7 | [ { a: '3' } ],
|
8 | [ { a: 3 } ]
|
9 | );
|
10 | t.end();
|
11 | });
|
12 |
|
13 | test('deep loose equal', function (t) {
|
14 | t.deepLooseEqual(
|
15 | [ { a: '3' } ],
|
16 | [ { a: 3 } ]
|
17 | );
|
18 | t.end();
|
19 | });
|
20 |
|
21 | test('requires 2 arguments', function (t) {
|
22 | var err = /^TypeError: two arguments must be provided/;
|
23 | t.throws(function () { t.deepEqual(); }, err, 'deepEqual: no args');
|
24 | t.throws(function () { t.deepEqual(undefined); }, err, 'deepEqual: one arg');
|
25 | t.throws(function () { t.deepLooseEqual(); }, err, 'deepLooseEqual: no args');
|
26 | t.throws(function () { t.deepLooseEqual(undefined); }, err, 'deepLooseEqual: one arg');
|
27 | t.throws(function () { t.notDeepEqual(); }, err, 'notDeepEqual: no args');
|
28 | t.throws(function () { t.notDeepEqual(undefined); }, err, 'notDeepEqual: one arg');
|
29 | t.throws(function () { t.notDeepLooseEqual(); }, err, 'notDeepLooseEqual: no args');
|
30 | t.throws(function () { t.notDeepLooseEqual(undefined); }, err, 'notDeepLooseEqual: one arg');
|
31 | t.throws(function () { t.equal(); }, err, 'equal: no args');
|
32 | t.throws(function () { t.equal(undefined); }, err, 'equal: one arg');
|
33 | t.throws(function () { t.notEqual(); }, err, 'notEqual: no args');
|
34 | t.throws(function () { t.notEqual(undefined); }, err, 'notEqual: one arg');
|
35 |
|
36 | t.end();
|
37 | });
|