如何使用带矩时区的cypress

如何使用带矩时区的cypress,cypress,moment-timezone,Cypress,Moment Timezone,Cypress将矩库导入其API中,可以通过Cypress.矩(日期) 但是我需要使用时刻时区而不是测试中的时刻来在时区之间切换。 以前(cypress@4.10)它的工作原理如下: // cypress/support/index.js Cypress.moment = require('moment-timezone'); 但是自从升级到cypress@4.12我遇到以下错误: TS2339: Property 'tz' does not exist on type '{ (...arg

Cypress将矩库导入其API中,可以通过
Cypress.矩(日期)

但是我需要使用时刻时区而不是测试中的时刻来在时区之间切换。 以前(
cypress@4.10
)它的工作原理如下:

// cypress/support/index.js
Cypress.moment = require('moment-timezone');
但是自从升级到
cypress@4.12
我遇到以下错误:

TS2339: Property 'tz' does not exist on type '{ (...args: any[]): any; momentProperties: any[]; suppressDeprecationWarnings: boolean; deprecationHandler: any; parseTwoDigitYear(input: any): number; createFromInputFallback: any; ISO_8601(): void; ... 34 more ...; HTML5_FMT: { ...; }; }'