jest-graphql-transform
TypeScript icon, indicating that this package has built-in type declarations

1.0.3 • Public • Published

jest-transform-graphql

graphql-tag loader for Webpack lets you keep GraphQL queries in separate files.

This lib makes those work in Jest.

Usage

In your package.json,

  "jest": {
    "transform": {
      "\\.(gql|graphql)$": "jest-transform-graphql",
      ".*": "babel-jest"
    }
  }

You have to include the .* matcher because once you define the transform property, it overrides that default.

For more on configuring Jest mappers, see Jest's Webpack tutorial.

Readme

Keywords

Package Sidebar

Install

npm i jest-graphql-transform

Weekly Downloads

25

Version

1.0.3

License

MIT

Unpacked Size

8.96 kB

Total Files

10

Last publish

Collaborators

  • vinccool96