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

react-native-testing-library

Package Overview
Dependencies
Maintainers
1
Versions
40
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

react-native-testing-library - npm Package Compare versions

Comparing version 1.2.0 to 1.3.0

2

package.json
{
"name": "react-native-testing-library",
"version": "1.2.0",
"version": "1.3.0",
"description": "Simple React Native testing utilities helping you write better tests with less effort",

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

@@ -298,2 +298,3 @@ # react-native-testing-library

debug.deep(<Component />);
debug.deep(toJSON(), 'actually debug JSON too'); // useful when Component state changes
```

@@ -300,0 +301,0 @@

@@ -23,6 +23,15 @@ // @flow

*/
function debugDeep(instance: React.Element<*>, message?: any) {
const { toJSON } = render(instance);
console.log(format(toJSON()), message || '');
function debugDeep(
instance: React.Element<*> | ?ReactTestRendererJSON,
message?: any = ''
) {
try {
// We're assuming React.Element<*> here and fallback to
// rendering ?ReactTestRendererJSON
// $FlowFixMe
const { toJSON } = render(instance);
console.log(format(toJSON()), message);
} catch (e) {
console.log(format(instance), message);
}
}

@@ -29,0 +38,0 @@

@@ -61,3 +61,6 @@ import * as React from 'react';

shallow: DebugFunction;
deep: (instance: React.ReactElement<any>, message?: string) => void;
deep: (
instance: React.ReactElement<any> | ReactTestRendererJSON | null,
message?: string
) => void;
};

@@ -64,0 +67,0 @@

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