mirror of
https://github.com/coderaiser/cloudcmd.git
synced 2026-01-23 02:35:49 +00:00
chore(cloudcmd) update dependencies
This commit is contained in:
parent
4c7f8cc6b6
commit
c719e37cc1
5 changed files with 37 additions and 21 deletions
|
|
@ -1,6 +1,8 @@
|
|||
'use strict';
|
||||
|
||||
const test = require('supertape');
|
||||
const tryCatch = require('try-catch');
|
||||
|
||||
const datetime = require('./datetime');
|
||||
|
||||
test('common: datetime', (t) => {
|
||||
|
|
@ -9,7 +11,7 @@ test('common: datetime', (t) => {
|
|||
|
||||
const expected = '2018.08.17 10:56:48';
|
||||
|
||||
t.equals(result, expected, 'should equal');
|
||||
t.equal(result, expected, 'should equal');
|
||||
t.end();
|
||||
});
|
||||
|
||||
|
|
@ -39,14 +41,15 @@ test('common: 0 before number', (t) => {
|
|||
|
||||
const expected = '2018.08.17 10:56:08';
|
||||
|
||||
t.equals(result, expected, 'should equal');
|
||||
t.equal(result, expected, 'should equal');
|
||||
t.end();
|
||||
});
|
||||
|
||||
test('common: datetime: wrong args', (t) => {
|
||||
const fn = () => datetime({});
|
||||
const [error] = tryCatch(datetime, {});
|
||||
|
||||
t.throws(fn, /date should be instanceof Date!/, 'should throw');
|
||||
t.equal(error.message, 'date should be instanceof Date!', 'should throw');
|
||||
t.end();
|
||||
});
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue