From 2925c0abcc6fc70bda0e961fbed513e6019f2096 Mon Sep 17 00:00:00 2001 From: Marnus Weststrate Date: Mon, 15 Jul 2019 19:26:00 +0100 Subject: [PATCH] fix: merge extended matchers with the global namespace (#9) Closes #7 --- extend-expect.d.ts | 20 +++++++++++--------- 1 file changed, 11 insertions(+), 9 deletions(-) diff --git a/extend-expect.d.ts b/extend-expect.d.ts index f0ce3a1..a0709cf 100644 --- a/extend-expect.d.ts +++ b/extend-expect.d.ts @@ -1,13 +1,15 @@ import { ReactTestInstance } from 'react-test-renderer'; -declare namespace jest { - interface Matchers { - toBeDisabled(): R; - toContainElement(element: ReactTestInstance | null): R; - toBeEmpty(): R; - toHaveProp(attr: string, value?: any): R; - toHaveTextContent(text: string | RegExp, options?: { normalizeWhitespace: boolean }): R; - toBeEnabled(): R; - toHaveStyle(style: object[] | object): R; +declare global { + namespace jest { + interface Matchers { + toBeDisabled(): R; + toContainElement(element: ReactTestInstance | null): R; + toBeEmpty(): R; + toHaveProp(attr: string, value?: any): R; + toHaveTextContent(text: string | RegExp, options?: { normalizeWhitespace: boolean }): R; + toBeEnabled(): R; + toHaveStyle(style: object[] | object): R; + } } }