Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@testing-library/react-hooks

Package Overview
Dependencies
Maintainers
16
Versions
53
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@testing-library/react-hooks - npm Package Compare versions

Comparing version 5.0.2 to 5.0.3

4

lib/core/index.js

@@ -57,5 +57,7 @@ "use strict";

get error() {
var _results2;
const {
error
} = results[results.length - 1];
} = (_results2 = results[results.length - 1]) != null ? _results2 : {};
return error;

@@ -62,0 +64,0 @@ }

{
"name": "@testing-library/react-hooks",
"version": "5.0.2",
"version": "5.0.3",
"description": "Simple and complete React hooks testing utilities that encourage good testing practices.",

@@ -5,0 +5,0 @@ "main": "lib/index.js",

@@ -22,3 +22,3 @@ import { CreateRenderer, Renderer, RenderResult, RenderHookOptions } from '../types'

get error() {
const { error } = results[results.length - 1]
const { error } = results[results.length - 1] ?? {}
return error

@@ -25,0 +25,0 @@ }

@@ -55,2 +55,8 @@ import { renderHook } from '..'

})
test('should return undefined if error is requested before suspension has resolved', async () => {
const { result } = renderHook(() => useFetchName(true))
expect(result.error).toBe(undefined)
})
})

@@ -55,2 +55,8 @@ import { renderHook } from '..'

})
test('should return undefined if error is requested before suspension has resolved', async () => {
const { result } = renderHook(() => useFetchName(true))
expect(result.error).toBe(undefined)
})
})
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