这是indexloc提供的服务,不要输入任何密码
Skip to content
This repository was archived by the owner on Feb 24, 2019. It is now read-only.
This repository was archived by the owner on Feb 24, 2019. It is now read-only.

Add support for testing of Relay enabled components #20

@adamkl

Description

@adamkl

Is this a bug report?

Yes

Steps to Reproduce

(Write your steps here:)

  1. Create a unit test that calls a component that contains a graphql tagged template literal
  2. run yarn test

Expected Behavior

Unit test passes

Actual Behavior

 FAIL  src\App\App.test.js
  ● Test suite failed to run

    Invariant Violation: graphql: Unexpected invocation at runtime. Either the Babel transform was not set up, or it failed to identify this call site.
 Make sure it is being used verbatim as `graphql`.

      at invariant (node_modules/fbjs/lib/invariant.js:42:15)
      at Object.graphql (node_modules/relay-runtime/lib/RelayModernGraphQLTag.js:22:32)
      at Object.<anonymous> (src/Benefit/CalcRow.js:19:20)
      at Object.<anonymous> (src/Benefit/Benefit.js:3:16)
      at Object.<anonymous> (src/Benefit/index.js:1:180)
      at Object.<anonymous> (src/BenefitPage.js:4:16)
      at Object.<anonymous> (src/App/App.js:15:329)
      at Object.<anonymous> (src/App/App.test.js:3:12)
          at <anonymous>
      at process._tickCallback (internal/process/next_tick.js:188:7)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions