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.3.0 to 1.3.1

14

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

@@ -20,11 +20,11 @@ "main": "src/index.js",

"chalk": "^2.4.1",
"conventional-changelog-cli": "^2.0.5",
"conventional-changelog-cli": "^2.0.11",
"dedent": "^0.7.0",
"eslint": "^5.6.1",
"flow-bin": "^0.83.0",
"flow-bin": "^0.86.0",
"jest": "^23.6.0",
"metro-react-native-babel-preset": "^0.48.0",
"react": "16.6.0-alpha.8af6728",
"react-native": "^0.57.3",
"react-test-renderer": "16.6.0-alpha.8af6728",
"metro-react-native-babel-preset": "^0.49.0",
"react": "16.6.1",
"react-native": "^0.57.5",
"react-test-renderer": "16.6.1",
"release-it": "^7.6.2",

@@ -31,0 +31,0 @@ "strip-ansi": "^5.0.0",

@@ -16,6 +16,8 @@ # react-native-testing-library

You want to write maintainable tests for your React Native components without testing implementation details, but then you're told to use Enzyme, which only supports shallow rendering in React Native environment. And you want to render deep! But doing so with `react-test-renderer` is so painful.
You want to write maintainable tests for your React Native components without testing implementation details, but then you're told to use Enzyme, which you learn has no React Native adapter, meaning only shallow rendering is supported. And you want to render deep! But deep rendering may otherwise require jsdom (React Native isn't the web!), while doing deep rendering with `react-test-renderer` is so painful.
You would also like to use the newest React features, but you need to wait for your testing library's abstractions to catch up and it takes a while.
You finally want to approach testing using only best practices, while Enzyme may encourage assertions on implementation details.
## This solution

@@ -81,3 +83,3 @@

Deeply render given React element and returns helpers to query the output. For convenience it also returns `react-test-renderer`'s `instance` and `renderer` objects, in case you need more control.
Deeply render given React element and returns helpers to query the output.

@@ -84,0 +86,0 @@ ```jsx

@@ -8,3 +8,3 @@ // @flow

node.type.displayName === name ||
node.type === name;
(typeof name === 'function' && node.type === name);

@@ -11,0 +11,0 @@ const getNodeByText = (node, text) =>

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