npm

Ready to take your JavaScript development to the next level? Meet npm Enterprise - the ultimate in enterprise JavaScript.Learn more »

jest-expo

34.0.1 • Public • Published

jest-expo

A Jest preset to painlessly test your Expo apps.

If you have problems with the code in this repository, please file issues & bug reports at https://github.com/expo/expo. Thanks!

Installation

  • yarn add jest-expo --dev or npm i jest-expo --save-dev

  • Add the following config to package.json:

    "scripts": {
      "test": "node_modules/.bin/jest",
      "test:debug": "node --inspect-brk node_modules/jest/bin/jest.js --runInBand"
    },
    "jest": {
      "preset": "jest-expo"
    }
  • Create a __tests__ directory anywhere you like and a Example-test.js file inside of it, and add this code:

    it('works', () => {
      expect(1).toBe(1);
    });
  • Run npm test and it should pass

Learning Jest

Read the excellent documentation

Keywords

none

install

npm i jest-expo

Downloadsweekly downloads

26,797

version

34.0.1

license

MIT

homepage

github.com

repository

Gitgithub

last publish

collaborators

  • avatar
  • avatar
  • avatar
  • avatar
  • avatar
  • avatar
  • avatar
  • avatar
  • avatar
  • avatar
  • avatar
  • avatar
  • avatar
  • avatar
  • avatar
Report a vulnerability