New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

react-crouton

Package Overview
Dependencies
Maintainers
1
Versions
19
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

react-crouton - npm Package Compare versions

Comparing version 0.2.6 to 0.2.7

18

__tests__/crouton-test.js

@@ -5,5 +5,5 @@ // __test__/crouton-test.js

var React = require('react/addons')
var React = require('react')
var Crouton = React.createFactory(require('../index.js'))
var TestUtils = React.addons.TestUtils
var TestUtils = require('react-addons-test-utils')

@@ -30,16 +30,16 @@ describe('Crouton', function () {

var pdiv = TestUtils.findRenderedDOMComponentWithClass(crouton, 'crouton')
expect(pdiv.getDOMNode().hidden, false)
expect(pdiv.hidden, false)
// Verify textContent
var cdiv = TestUtils.findRenderedDOMComponentWithClass(crouton, data.type)
expect(cdiv.getDOMNode().textContent, data.message)
expect(cdiv.textContent, data.message)
// Verify has a child span
var spans = cdiv.getDOMNode().getElementsByTagName('span')
var spans = cdiv.getElementsByTagName('span')
expect(spans.length, 1)
expect(spans[0], data.message)
// No buttons
expect(cdiv.getDOMNode().getElementsByTagName('button'), [])
expect(cdiv.getElementsByTagName('button'), [])
// Crouton will hidden after 2000 ms default
runs(function () {
setTimeout(function () {
expect(pdiv.getDOMNode().hidden, true)
expect(pdiv.hidden, true)
}, 2000)

@@ -67,3 +67,3 @@ })

// Verify has a child span
var spans = cdiv.getDOMNode().getElementsByTagName('span')
var spans = cdiv.getElementsByTagName('span')
expect(spans.length, 2)

@@ -77,3 +77,3 @@ data.message.forEach(function (msg, i) {

setTimeout(function () {
expect(pdiv.getDOMNode().hidden, true)
expect(pdiv.hidden, true)
}, 2000)

@@ -80,0 +80,0 @@ })

var React = require('react');
var emptyFunction = require('react/lib/emptyFunction');
var PropTypes = React.PropTypes;
var noop = function() {}
function formatButtons(buttons) {

@@ -65,3 +66,3 @@ if (typeof buttons === 'string')

return {
onDismiss: emptyFunction,
onDismiss: noop,
// 2000 ms

@@ -68,0 +69,0 @@ timeout: 2000,

{
"name": "react-crouton",
"version": "0.2.6",
"version": "0.2.7",
"description": "A message component for reactjs.",

@@ -42,6 +42,7 @@ "main": "index.js",

"gulp-size": "^1.1.0",
"jest-cli": "^0.2.2",
"react": "^0.12.1",
"reactify": "^0.17.1"
"jest-cli": ">0.2.2",
"react": ">0.12.1",
"react-addons-test-utils": "^0.14.0",
"reactify": ">0.17.1"
}
}
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