Skip to content

Matcher import path is broken in get-queries-for-element typings file #42

Closed
@kamalgill

Description

@kamalgill

The Matcher import in typings/get-queries-for-element.d.ts is incorrect.

  • dom-testing-library version: 2.3.1
  • react version: 16.3.1
  • node version: 8.11.1
  • npm (or yarn) version: 6.0.1

Relevant code or config:

The current (incorrect) code is:

import {Matcher} from 'matches'

The correct import is as follows:

import {Matcher} from './matches'

What you did:

Attempt to call ReactTesting.renderIntoDocument(...) in a foo.test.tsx file fails.
Unfortunately the code is in a private GitHub repo that can't be shared here.

What happened:

TypeScript compilation of the app fails and returns the following error message:

node_modules/dom-testing-library/typings/get-queries-for-element.d.ts
(1,23): Cannot find module 'matches'.

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