From 3a1054413626549cba236987e689492263b74c5a Mon Sep 17 00:00:00 2001 From: Arctic Ice Studio Date: Thu, 25 Apr 2019 14:31:52 +0200 Subject: [PATCH] Add extracted `renderHook` helper via `react-hooks-testing-library` The `renderHook` helper has been extracted from `react-testing-library` (1) into the `react-hooks-testing-library` standalone package (2) for better modularization. Therefore the package has been added as development dependency in order to test Hook based implementations. References: (1) https://github.com/kentcdodds/react-testing-library/releases/tag/v6.0.0 (2) https://www.npmjs.com/package/react-hooks-testing-library GH-137 --- package-lock.json | 20 ++++++++++++++++++++ package.json | 1 + 2 files changed, 21 insertions(+) diff --git a/package-lock.json b/package-lock.json index 858f21ed..b0c2e3be 100644 --- a/package-lock.json +++ b/package-lock.json @@ -16211,6 +16211,26 @@ "react-side-effect": "^1.1.0" } }, + "react-hooks-testing-library": { + "version": "0.5.0", + "resolved": "https://registry.npmjs.org/react-hooks-testing-library/-/react-hooks-testing-library-0.5.0.tgz", + "integrity": "sha512-qX4SA28pcCCf1Q23Gtl1VKqQk26pSPTEsdLtfJanDqm4oacT5wadL+e2Xypk/H+AOXN5kdZrWmXkt+hAaiNHgg==", + "dev": true, + "requires": { + "@babel/runtime": "^7.4.2" + }, + "dependencies": { + "@babel/runtime": { + "version": "7.4.3", + "resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.4.3.tgz", + "integrity": "sha512-9lsJwJLxDh/T3Q3SZszfWOTkk3pHbkmH+3KY+zwIDmsNlxsumuhS2TH3NIpktU4kNvfzy+k3eLT7aTJSPTo0OA==", + "dev": true, + "requires": { + "regenerator-runtime": "^0.13.2" + } + } + } + }, "react-hot-loader": { "version": "4.8.4", "resolved": "https://registry.npmjs.org/react-hot-loader/-/react-hot-loader-4.8.4.tgz", diff --git a/package.json b/package.json index c8f348a9..fd566110 100644 --- a/package.json +++ b/package.json @@ -80,6 +80,7 @@ "lint-staged": "8.1.5", "npm-run-all": "4.1.5", "prettier": "1.17.0", + "react-hooks-testing-library": "0.5.0", "react-testing-library": "6.1.2", "rehype-slug": "2.0.2", "remark-breaks": "1.0.2",