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

react-notification

Package Overview
Dependencies
Maintainers
1
Versions
56
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

react-notification - npm Package Compare versions

Comparing version 5.0.6 to 5.0.7

4

dist/notification.js

@@ -37,2 +37,6 @@ 'use strict';

_this.handleClick = _this.handleClick.bind(_this);
if (_this.props.onDismiss && _this.props.isActive) {
_this.dismissTimeout = setTimeout(_this.props.onDismiss, _this.props.dismissAfter);
}
return _this;

@@ -39,0 +43,0 @@ }

2

package.json
{
"name": "react-notification",
"version": "5.0.6",
"version": "5.0.7",
"description": "Snackbar style notification component for React.",

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

@@ -163,2 +163,24 @@ import { Notification, NotificationStack } from '../src/index';

});
it('onDismiss fires correctly without prop change', done => {
const handleDismiss = spy();
const wrapper = mount(
<Notification
message={mockNotification.message}
dismissAfter={mockNotification.dismissAfter}
onDismiss={handleDismiss}
isActive
/>
);
setTimeout(() => {
try {
expect(handleDismiss.calledOnce).to.equal(true);
done();
} catch (e) {
done(e);
}
}, mockNotification.dismissAfter);
})
});
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