Socket
Socket
Sign inDemoInstall

jest-react-hooks-shallow

Package Overview
Dependencies
Maintainers
1
Versions
9
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

jest-react-hooks-shallow - npm Package Compare versions

Comparing version 1.4.2 to 1.5.0

samples-and-e2e-tests/cra-with-mocking-by-default/.env

4

lib/mock-use-effect/mock-use-effect.js

@@ -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

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc