[Enterprise Search] Fix failing snapshop tests (#149864)

## Summary

This fixes a few snapshot tests that were failing locally due to
timezone differences. Running tests locally now uses the same UTC
timezone that's used in CI.
This commit is contained in:
Sander Philipse 2023-01-31 11:26:13 +01:00 committed by GitHub
parent 7006c7a02d
commit 4baa14ab02
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 11110 additions and 4 deletions

View file

@ -25,4 +25,4 @@ fi
# @see https://jestjs.io/docs/en/cli#options
ARGS="${*:2}"
yarn test:jest $TARGET $ARGS
TZ="Etc/UTC" yarn test:jest $TARGET $ARGS

View file

@ -17,9 +17,7 @@ import { CronEditor } from './cron_editor';
describe('CronEditor', () => {
['MINUTE', 'HOUR', 'DAY', 'WEEK', 'MONTH', 'YEAR'].forEach((unit) => {
// Skipped during Jest 29 upgrade
// No snapshot has been committed
test.skip(`is rendered with a ${unit} frequency`, () => {
it(`is rendered with a ${unit} frequency`, () => {
const component = mountWithI18nProvider(
<CronEditor
fieldToPreferredValueMap={{}}