react-native/jest
empyrical 03476a225e Add support for out-of-tree platform plugins (#20825)
Summary:
This pull request adds the ability for a platform developer to provide a `"haste"` key under the `"rnpm"` key in their `package.json` which allows the packager to pick up that platform's javascript files. The intent is to remove the need to have custom platforms hardcoded in. This is inspired by the `"jest": { "haste": {} }` key used by jest.

For example, React Native Dom would have an entry like:

```json
{
  "rnpm": {
    "haste": {
      "providesModuleNodeModules": [
        "react-native-dom"
      ],
      "platforms": [
        "dom"
      ]
    }
  }
}
```

Support for more keys (path blacklists perhaps?) could be added in the future.

This succeeds #20662, as per a discussion I had with matthargett.

I've got an open discussion over here as well: https://github.com/react-native-community/discussions-and-proposals/issues/21
Pull Request resolved: https://github.com/facebook/react-native/pull/20825

Differential Revision: D9596429

Pulled By: hramos

fbshipit-source-id: a02f0da0bea8870bdc45d55e23da8ccbc36249f2
2018-08-30 16:38:07 -07:00
..
__tests__ Add support for out-of-tree platform plugins (#20825) 2018-08-30 16:38:07 -07:00
MockNativeMethods.js RN: Refactor `MockNativeMethods` in Jest 2018-05-09 01:16:11 -07:00
assetFileTransformer.js Fix jest snapshot testing on windows 2018-05-31 12:58:05 -07:00
hasteImpl.js Add support for out-of-tree platform plugins (#20825) 2018-08-30 16:38:07 -07:00
mockComponent.js Enforce component name 2018-06-26 07:47:11 -07:00
preprocessor.js Standarize options passed to the transformer 2018-08-23 15:48:03 -07:00
setup.js Remove view configs from JS 2018-08-24 14:04:09 -07:00