react-notification
Advanced tools
Comparing version 6.6.1 to 6.6.2
@@ -40,3 +40,3 @@ ## Introduction | ||
action: 'Dismiss', | ||
onClick: (deactivate) => { | ||
onClick: (notification, deactivate) => { | ||
deactivate(); | ||
@@ -43,0 +43,0 @@ this.removeNotification('some UID'); |
{ | ||
"name": "react-notification", | ||
"version": "6.6.1", | ||
"version": "6.6.2", | ||
"description": "Snackbar style notification component for React", | ||
@@ -69,2 +69,3 @@ "main": "dist/index.js", | ||
"react": "^15.5.4", | ||
"react-addons-test-utils": "^15.5.1", | ||
"react-dom": "^15.5.4", | ||
@@ -78,5 +79,4 @@ "react-test-renderer": "^15.5.4", | ||
"dependencies": { | ||
"prop-types": "^15.5.8", | ||
"react-addons-test-utils": "^15.5.1" | ||
"prop-types": "^15.5.8" | ||
} | ||
} |
@@ -15,3 +15,3 @@ import React from 'react'; | ||
it('notification prop isActive set to false after deactivate called in onClick', () => { | ||
it('notification prop isActive set to false after deactivate called in onClick', (done) => { | ||
@@ -21,3 +21,3 @@ const myNotification = Object.assign( | ||
mockNotification, | ||
{ onClick: deactivate => deactivate() } | ||
{ onClick: (notification, deactivate) => deactivate() } | ||
); | ||
@@ -33,5 +33,9 @@ | ||
const notification = wrapper.find(Notification); | ||
setTimeout(() => expect(notification.prop('isActive')).to.equal(true), 10); | ||
notification.simulate('click'); | ||
expect(notification.prop('isActive')).to.equal(false); | ||
const action = notification.find('.notification-bar-action'); | ||
setTimeout(() => { | ||
expect(notification.prop('isActive')).to.equal(true); | ||
action.simulate('click'); | ||
expect(notification.prop('isActive')).to.equal(false); | ||
done(); | ||
}, 10); | ||
}); | ||
@@ -38,0 +42,0 @@ |
Deprecated
MaintenanceThe maintainer of the package marked it as deprecated. This could indicate that a single version should not be used, or that the package is no longer maintained and any new vulnerabilities will not be fixed.
Found 1 instance in 1 package
533770
2
1101
0
32
- Removedreact-addons-test-utils@^15.5.1
- Removedreact-addons-test-utils@15.6.2(transitive)
- Removedreact-dom@15.7.0(transitive)