如何确保使用Jest进行快照测试在特定时区运行?

时间:2020-02-10 13:32:14

标签: javascript jestjs

我正在创建一个项目,并希望确保快照测试中的故事快照在UTC + 3中运行。为此,我将process.env.TZ ='UTC + 3';在jest.config.storyshots.js文件中

const jestConfigCommon = require('./jest.config.common');
process.env.TZ = 'UTC+3';
module.exports = {
    ...jestConfigCommon,
    testMatch: [
        "<rootDir>/tests/storyshots.test.ts",
    ],
};

我正在使用“ jest-config”:“ ^ 24.9.0”

但这没有帮助,因此我真的需要您的帮助

如果不清楚,请告诉我

0 个答案:

没有答案