mirror of
https://github.com/coderaiser/cloudcmd.git
synced 2026-01-23 02:35:49 +00:00
chore: lint
This commit is contained in:
parent
43edba8cb8
commit
cc889bda4f
48 changed files with 64 additions and 62 deletions
|
|
@ -1,7 +1,7 @@
|
|||
'use strict';
|
||||
|
||||
const test = require('supertape');
|
||||
const tryCatch = require('try-catch');
|
||||
const {tryCatch} = require('try-catch');
|
||||
|
||||
const datetime = require('./datetime');
|
||||
|
||||
|
|
@ -16,11 +16,11 @@ test('common: datetime', (t) => {
|
|||
});
|
||||
|
||||
test('common: datetime: no arg', (t) => {
|
||||
const {Date} = global;
|
||||
const {Date} = globalThis;
|
||||
|
||||
let called = false;
|
||||
|
||||
global.Date = class extends Date {
|
||||
globalThis.Date = class extends Date {
|
||||
constructor() {
|
||||
super();
|
||||
called = true;
|
||||
|
|
@ -29,7 +29,7 @@ test('common: datetime: no arg', (t) => {
|
|||
|
||||
datetime();
|
||||
|
||||
global.Date = Date;
|
||||
globalThis.Date = Date;
|
||||
|
||||
t.ok(called, 'should call new Date');
|
||||
t.end();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue