diff --git a/global-setup.js b/global-setup.js new file mode 100644 index 000000000..3d1e8924f --- /dev/null +++ b/global-setup.js @@ -0,0 +1,3 @@ +module.exports = async () => { + process.env.TZ = 'UTC'; +}; diff --git a/jest.config.js b/jest.config.js index 5025db858..37583d875 100644 --- a/jest.config.js +++ b/jest.config.js @@ -22,6 +22,7 @@ module.exports = { projects: ['core', 'layout', 'forms', 'icons', 'utils'].map(name => ({ displayName: name, setupFilesAfterEnv: ['/jest.setupAfterEnv.js'], + globalSetup: '/global-setup.js', moduleNameMapper: { '^@test-utils': '/test-utils', '^@medly-components/(.*)$': '/packages/$1/src/index' diff --git a/packages/forms/src/components/Form/Form.test.tsx b/packages/forms/src/components/Form/Form.test.tsx index 0e76fd358..e7e1e3018 100644 --- a/packages/forms/src/components/Form/Form.test.tsx +++ b/packages/forms/src/components/Form/Form.test.tsx @@ -336,7 +336,7 @@ describe('Form', () => { it('with onChangeFormatter', async () => { const mockOnSubmit = jest.fn(), formData = { - birthDate: '2024-07-19T00:00:00+05:30' + birthDate: '2024-07-19T00:00:00Z' }; render(
{ }} onSubmit={mockOnSubmit} initialState={{ - birthDate: '2024-07-18T00:00:00+05:30' + birthDate: '2024-07-18T00:00:00Z' }} /> );