Files
flipper/desktop/scripts/jest-transform.js
Lorenzo Blasa 6430403da0 Jest update v26.6.3 -> v29.5.1
Summary:
^

Basically, update Jest and fix any raised issues. Mainly:
- Update necessary dependencies
- Update snapshots
- `useFakeTimers` caused a few issues which meant that the way we hook into the performance object had to be tweaked. The main code change is: `//fbsource/xplat/sonar/desktop/scripts/jest-setup-after.tsx`
- `mocked` -> `jest.mocked`

Changelog: Update Jest to v29.5.1

Reviewed By: antonk52

Differential Revision: D46319818

fbshipit-source-id: d218ca8f7e43abac6b00844953ddeb7f4e1010a2
2023-05-31 14:19:29 -07:00

29 lines
707 B
JavaScript

/**
* Copyright (c) Meta Platforms, Inc. and affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*
* @format
*/
const isFB = require('./isFB');
if (isFB && process.env.FLIPPER_FB === undefined) {
process.env.FLIPPER_FB = 'true';
}
process.env.FLIPPER_TEST_RUNNER = 'true';
// eslint-disable-next-line import/no-unresolved,flipper/no-relative-imports-across-packages
const {transform} = require('../babel-transformer/lib/transform-jest');
module.exports = {
process(src, filename, options) {
return transform({
src,
filename,
options: {...options, isTestRunner: true},
});
},
};