jest-transform-graphql
Jest transformer for .gql imports
Last updated 3 years ago by remind .
ISC · Repository · Bugs · Original npm · Tarball · package.json
$ cnpm install jest-transform-graphql 
SYNC missed versions from official npm registry.

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.

Current Tags

  • 2.1.0                                ...           latest (3 years ago)

3 Versions

  • 2.1.0                                ...           3 years ago
  • 2.0.0                                ...           3 years ago
  • 1.0.0                                ...           3 years ago

Copyright 2014 - 2016 © taobao.org |