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

react-test-renderer

Package Overview
Dependencies
Maintainers
5
Versions
1965
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

react-test-renderer - npm Package Compare versions

Comparing version 0.0.0-experimental-2e470a788-20240214 to 0.0.0-experimental-2ec26bc4-20241111

2

index.js
'use strict';
if (process.env.NODE_ENV === 'production') {
module.exports = require('./cjs/react-test-renderer.production.min.js');
module.exports = require('./cjs/react-test-renderer.production.js');
} else {
module.exports = require('./cjs/react-test-renderer.development.js');
}
{
"name": "react-test-renderer",
"version": "0.0.0-experimental-2e470a788-20240214",
"version": "0.0.0-experimental-2ec26bc4-20241111",
"description": "React package for snapshot testing.",

@@ -20,10 +20,9 @@ "main": "index.js",

},
"homepage": "https://reactjs.org/",
"homepage": "https://react.dev/",
"dependencies": {
"react-is": "0.0.0-experimental-2e470a788-20240214",
"react-shallow-renderer": "^16.15.0",
"scheduler": "0.0.0-experimental-2e470a788-20240214"
"react-is": "0.0.0-experimental-2ec26bc4-20241111",
"scheduler": "0.0.0-experimental-2ec26bc4-20241111"
},
"peerDependencies": {
"react": "0.0.0-experimental-2e470a788-20240214"
"react": "0.0.0-experimental-2ec26bc4-20241111"
},

@@ -35,5 +34,4 @@ "files": [

"shallow.js",
"cjs/",
"umd/"
"cjs/"
]
}

@@ -1,3 +0,19 @@

# `react-test-renderer`
# `react-test-renderer` (DEPRECATED)
## Deprecation notice
`react-test-renderer` is deprecated and no longer maintained. It will be removed in a future version. As of React 19, you will see a console warning when invoking `ReactTestRenderer.create()`.
### React Testing
This library creates a contrived environment and its APIs encourage introspection on React's internals, which may change without notice causing broken tests. It is instead recommended to use browser-based environments such as jsdom and standard DOM APIs for your assertions.
The React team recommends [`@testing-library/react`](https://testing-library.com/docs/react-testing-library/intro) as a modern alternative that uses standard APIs, avoids internals, and [promotes best practices](https://testing-library.com/docs/guiding-principles).
### React Native Testing
The React team recommends @testing-library/react-native as a replacement for `react-test-renderer` for native integration tests. This React Native testing-library variant follows the same API design as described above and promotes better testing patterns.
## Documentation
This package provides an experimental React renderer that can be used to render React components to pure JavaScript objects, without depending on the DOM or a native mobile environment.

@@ -7,6 +23,4 @@

Documentation:
Documentation: [https://reactjs.org/docs/test-renderer.html](https://reactjs.org/docs/test-renderer.html)
[https://reactjs.org/docs/test-renderer.html](https://reactjs.org/docs/test-renderer.html)
Usage:

@@ -13,0 +27,0 @@

'use strict';
module.exports = require('react-shallow-renderer');
function ReactShallowRenderer() {
throw new Error(
'react-test-renderer/shallow has been removed. See https://react.dev/warnings/react-test-renderer.'
);
}
module.exports = ReactShallowRenderer;

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is too big to display

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