如何解决如何在瞬间时区使用柏树
Cypress已将矩型库导入其API,并且可以由Cypress.moment(date)
访问
https://docs.cypress.io/api/utilities/moment.html#Syntax
但是我需要在测试中使用moment-timezone而不是moment来在时区之间进行切换。
以前(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: { ...; }; }'
版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。