Browse Source

Adds isDate tests

mbroad/unittest/lib/shared
MacLeod Broad 7 years ago
parent
commit
0f8455f3bb
No known key found for this signature in database GPG Key ID: F1B295D13C3CC9CF
1 changed files with 9 additions and 0 deletions
  1. +9
    -0
      test/util.test.js

+ 9
- 0
test/util.test.js View File

@ -520,6 +520,15 @@ describe('mergeOptions', function () {
it('identifies a date string', function () {
assert.equal(util.isDate(''), false);
});
it('identifies non-dates', function () {
assert.equal(util.isDate(null), false);
assert.equal(util.isDate(undefined), false);
assert.equal(util.isDate([1, 2, 3]), false);
assert.equal(util.isDate({a: 42}), false);
assert.equal(util.isDate(42), false);
assert.equal(util.isDate('meow'), false);
});
});
describe('convert', function () {

Loading…
Cancel
Save