expo-template-typescript-jest

1.0.1 • Public • Published

React Native Template Expo Typescript with Jest

Runs with expo npm IOS Android Web Typescript Tested with jest coverage Stars Issues MIT License

A React Native Template using Expo, Typescript and Jest
Explore the docs »
Report Bug · Request Feature

Table of Contents

  1. About The Project
  2. Getting Started
  3. Usage
  4. Contributing
  5. License
  6. Author
  7. Acknowledgements

About The Project

This template was developed to facilitate the creation of a new project using Expo, React Native and Jest.

React Native Template Expo Typescript with Jest

Built With

Getting Started

To get this template up and running follow these simple steps.

Prerequisites

Installation

Create a project with this template:

expo init --template expo-template-typescript-jest

(It will prompt you to enter a project name)

Usage

  • Navigate to the created directory
  • Start the project:
    yarn start
  • Then develop your app, creating files .tsx for React Native components and .ts for plain typescript files.

Testing

There are some examples of tsx testing, snapshot test and function test inside the project.

  • To run tests:
    yarn test
  • To run test coverage:
    yarn test:ci
  • To watch tests:
    yarn test:watch
  • To generate coverage badges:
    yarn test:badge

Using npm

If you prefer to use npm reather than using yarn, make the following changes:

  • Pass npm flag to installation: expo init --template expo-template-typescript-jest --npm
  • Change test scripts to use npm in package.json
      "test:watch": "npm test --watch",
      "test:ci": "npm test --coverage",
      "test:badges": "npm run test:ci  && jest-coverage-badges --input coverage/coverage-summary.json --output __badges__"
  • Run commands with npm: npm start, npm test, npm run test:watch, npm run test:ci, npm run test:badges

Contributing

Contributions are what make the open source community such an amazing place to be learn, inspire, and create. Any contributions you make are greatly appreciated.

  1. Fork the Project
  2. Create your Feature Branch (git checkout -b feature/AmazingFeature)
  3. Commit your Changes (git commit -m 'Add some AmazingFeature')
  4. Push to the Branch (git push origin feature/AmazingFeature)
  5. Open a Pull Request

License

Distributed under the MIT License. See LICENSE for more information.

Author

Eduardo Santos - elgsantos

Project Link: https://github.com/elgsantos/expo-template-typescript-jest

Acknowledgements

Package Sidebar

Install

npm i expo-template-typescript-jest

Weekly Downloads

1

Version

1.0.1

License

MIT

Unpacked Size

109 kB

Total Files

22

Last publish

Collaborators

  • elgsantos