Example TypeScript + React-Native + Jest project that integrates Detox for writing end-to-end tests
This is an example React-Native project that incorporates:
ts-jest
to allow Jest to understand your TS filesThis project uses emin93's react-native-template-typescript as a bootstrap.
The main goal of this project is to demonstrate how to incorporate Detox into a pre-existing TS/RN/Jest project, but you can use it as a starter template as well.
You can create a project similar to this one using the React Native CLI and react-native-template-ts-detox-jest
baseUrl
/paths
If you want to use TypeScript's baseUrl
and paths
options, you'll need to configure
babel-plugin-module-resolver
to your project dependencies:npm install -D babel-plugin-module-resolver
# yarn: yarn add -D babel-plugin-module-resolver
babel.config.js
, add the following:// ...
"plugins": [
[
"module-resolver",
{
"root": [ /* Put your `baseUrl` here */ ],
"alias": {
// Put your `paths` setup here
}
}
]
]
// ...
ts-jest
- Refer to this section in the ts-jest
docs.Issues and PRs are welcome!
Please note that this project is released with a Contributor Code of Conduct. By participating in this project you agree to abide by its terms.