jest-expo-ts v22.0.1
This package is based in jest-preset-typescript-react-native
jest-expo-ts
To simplify the configuration of jest with a react-native project that is using typescript in create-react-native-app or expo.
The configuration is simply just the jest-expo
preset with a couple other transformers to make jest work with ts
and tsx
files. After adding the preset you will be able to write your tests completely in typescript!
Alias
The package react-native-vecttor-icons
is aliased to @expo/vector-icons
.
Other packages can be added in the future. Let now if you need.
Install
The library can be installed with yarn with the following:
yarn add jest-expo-ts --dev
or with npm with the following:
npm install jest-expo-ts --save-dev
Usage
Add the preset to your Jest configuration :
{
"preset": "jest-expo-ts"
}
Update react-native default settings
By default when creating a react-native project jest will be already configured for you in the package.json
as follows:
"jest": {
"preset": "react-native"
}
To update the default react-native settings just change the preset to use this library instead. Like so:
"jest": {
"preset": "jest-expo-ts"
}
license-link: LICENSE.md
"transform-jest-deps": "^2.2.1" "peerDependencies": { "react-native": "*", "typescript": ">=2" },
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago