jest-react-hooks-shallow
Advanced tools
Comparing version 1.4.2 to 1.5.0
@@ -10,6 +10,2 @@ "use strict"; | ||
const cleanupFunctions = new Map(); | ||
beforeEach(() => { | ||
previousCalls.clear(); | ||
cleanupFunctions.clear(); | ||
}); | ||
return (effect, dependencies) => { | ||
@@ -16,0 +12,0 @@ const effectBody = effect.toString(); |
{ | ||
"name": "jest-react-hooks-shallow", | ||
"version": "1.4.2", | ||
"version": "1.5.0", | ||
"description": "React Hooks for shallow rendering", | ||
@@ -16,3 +16,5 @@ "homepage": "https://github.com/mikeborozdin/jest-react-hooks-shallow", | ||
"test:e2e:without-mocking-by-default": "cd samples-and-e2e-tests/without-mocking-by-default && npm i && npm test && cd ../..", | ||
"test:e2e": "npm run test:e2e:with-mocking-by-default && npm run test:e2e:without-mocking-by-default &", | ||
"test:e2e:cra-with-mocking-by-default": "cd samples-and-e2e-tests/cra-with-mocking-by-default && npm i && npm test && cd ../..", | ||
"test:e2e:cra-without-mocking-by-default": "cd samples-and-e2e-tests/cra-without-mocking-by-default && npm i && npm test && cd ../..", | ||
"test:e2e": "npm run test:e2e:with-mocking-by-default && npm run test:e2e:with-mocking-by-default && npm run test:e2e:without-mocking-by-default", | ||
"test": "npm run test:unit && npm run test:e2e", | ||
@@ -19,0 +21,0 @@ "lint": "eslint ./src/**/*.ts" |
jest-react-hooks-shallow | ||
==== | ||
[![Follow me on Twitter](https://img.shields.io/twitter/follow/mikeborozdin?style=social)](https://twitter.com/mikeborozdin) | ||
Short Story | ||
@@ -7,0 +4,0 @@ ==== |
@@ -61,3 +61,2 @@ import React from 'react'; | ||
jest.clearAllMocks(); | ||
jest.resetAllMocks(); | ||
}); | ||
@@ -64,0 +63,0 @@ |
@@ -34,4 +34,4 @@ import mockUseEffect from "./mock-use-effect/mock-use-effect"; | ||
} else { | ||
useEffectMock.mockImplementation(mockUseEffect()); | ||
useLayoutEffectMock.mockImplementation(mockUseEffect()); | ||
useEffectMock.mockImplementation(mockUseEffect()); | ||
useLayoutEffectMock.mockImplementation(mockUseEffect()); | ||
} | ||
@@ -38,0 +38,0 @@ }); |
@@ -14,7 +14,2 @@ type UseEffectSignature = (fn: () => void, triggers?: unknown[]) => void; | ||
beforeEach(() => { | ||
previousCalls.clear(); | ||
cleanupFunctions.clear(); | ||
}); | ||
return (effect: () => CleanupFunction | void, dependencies?: unknown[]): void => { | ||
@@ -21,0 +16,0 @@ const effectBody = effect.toString(); |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
2976497
80
48825
227