npm: possibly marvellous

    react-native-jest-serializer

    1.1.0 • Public • Published

    react-native-jest-serializer

    A jest snapshot serializer tailored for react-native.

    Features

    Hex color highlighting

    Screen Shot 2019-08-18 at 10 22 03 PM

    Style array merging

    Screen Shot 2019-08-18 at 10 09 48 PM

    Non-presentational prop omitting

    Screen Shot 2019-08-18 at 10 10 03 PM

    Setup

    yarn add -D react-native-jest-serializer

    Then either:

    Declare in your package.json / jest config:

    "jest": {
      "snapshotSerializers": ["react-native-jest-serializer"]
    }
    

    OR

    Add in your test setup file:

    expect.addSnapshotSerializer(require('react-native-jest-serializer'));

    Keywords

    none

    Install

    npm i react-native-jest-serializer

    DownloadsWeekly Downloads

    197

    Version

    1.1.0

    License

    MIT

    Unpacked Size

    266 kB

    Total Files

    9

    Last publish

    Collaborators

    • sterlingwes