Граф коммитов

3 Коммитов

Автор SHA1 Сообщение Дата
Michał Pierzchała 23ef604d41 chore: update Jest preset to align with Jest 24 (#24062)
Summary:
Jest 24 includes [`testMatch` and `moduleFileExtensions`](c5fd7aae93/packages/jest-config/src/Defaults.ts (L70)) that align with the ones that are currently there on master, because it added default handling for TypeScript as well. I think it's time for us to move to Jest 24. Is there a way we can tell users to upgrade Jest to certain version?

Fixes https://github.com/facebook/react-native/issues/24060

[General] [Changed] - update Jest preset to align with Jest 24
Pull Request resolved: https://github.com/facebook/react-native/pull/24062

Differential Revision: D14538988

Pulled By: cpojer

fbshipit-source-id: d8d152b8e8517b34144970f1cc1ed0b49f8b4e54
2019-03-20 04:58:20 -07:00
James Ide 7d84d0dc07 Remove react-clone-referenced-element dependency (#23933)
Summary:
This package was a dependency for ListView, which is no longer part of RN. Removed the dependency from package.json and yarn.lock.

Also removed its pattern from the Jest preset -- ListView is not in this repo and also react-clone-referenced-element was written at a time when Node did not support the same modern JS features as RN. The latest Node 8+ supports the features that react-clone-referenced-element uses so we don't need to transform it.

[General] [Removed] - Removed unused react-clone-referenced-element dependency
Pull Request resolved: https://github.com/facebook/react-native/pull/23933

Differential Revision: D14477240

Pulled By: cpojer

fbshipit-source-id: 4f6975133b54cc75088262cedd11da20225cada8
2019-03-15 11:50:07 -07:00
Simen Bekkhus 991e83f568 fix: use `require.resolve` in `jest-preset` (#22972)
Summary:
The current way the Jest preset work requires the different files to be in `<rootDir>/node_modules/react-native`. This is not necessarily true - especially in monorepoes.

If we instead do `require.resolve`, we do not need to do `rootDir` replacement in Jest.

Having a JS file as preset has been supported since Jest 23.0.0: https://github.com/facebook/jest/pull/6185

Changelog:
----------

[General] [Fixed] - use `require.resolve` in `jest-preset`
Pull Request resolved: https://github.com/facebook/react-native/pull/22972

Differential Revision: D13662758

Pulled By: hramos

fbshipit-source-id: ca79b5b89d9d05c6fe639b0d88619858e8d05da7
2019-01-14 16:35:38 -08:00