UNPKG

react-hooks-testing-library

Version:
29 lines (25 loc) 1.42 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); var _exportNames = { testHook: true }; exports.testHook = testHook; var _reactHooks = require("@testing-library/react-hooks"); Object.keys(_reactHooks).forEach(function (key) { if (key === "default" || key === "__esModule") return; if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return; Object.defineProperty(exports, key, { enumerable: true, get: function get() { return _reactHooks[key]; } }); }); var deprecationMessage = "\nreact-hooks-testing-library has moved to @testing-library/react-hooks!\n\nTo upgrade, run:\n\n npm uninstall react-hooks-testing-library\n npm install --save-dev @testing-library/react-hooks\n\nRemember to also update your import lines to the new package too:\n\n\x1B[31m - import { renderHook, act } from 'react-hooks-testing-library'\n\x1B[32m + import { renderHook, act } from '@testing-library/react-hooks'\n\nAlternatively, you can continue to use an older version of react-hooks-testing-library.\n\nMore details on the move can be found here: https://github.com/testing-library/react-hooks-testing-library/issues/99\n".trim(); console.warn(deprecationMessage); function testHook() { console.warn('`testHook` has been deprecated and will be removed in a future release. Please use `renderHook` instead.'); return renderHook.apply(void 0, arguments); }