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

assert-element

Package Overview
Dependencies
Maintainers
1
Versions
7
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

assert-element - npm Package Compare versions

Comparing version 0.2.0 to 0.3.0

2

component.json
{
"name": "assert-element",
"version": "0.2.0",
"version": "0.3.0",
"dependencies": {

@@ -5,0 +5,0 @@ "component/assert": "*"

0.3.0 / 2015-09-16
==================
* hasChildren: support a single string element as the criteria
0.2.0 / 2015-09-16

@@ -3,0 +8,0 @@ ==================

@@ -76,2 +76,4 @@

node.children.forEach(children);
} else if (typeof children === 'string') {
assert.deepEqual(node.children, [ children ]);
} else {

@@ -78,0 +80,0 @@ assert(node.children.length > 0, 'expected to find child nodes');

{
"name": "assert-element",
"version": "0.2.0",
"version": "0.3.0",
"description": "Assertions for checking virtual nodes used by Deku/React/etc",

@@ -5,0 +5,0 @@ "repository": "dekujs/assert-element",

@@ -189,2 +189,14 @@

it('should treat a string argument as a single child array', function () {
assertions.hasChildren(element('div', null, 'a'), 'a');
});
it('should throw if the children does not match the single argument', fail(function () {
assertions.hasChildren(element('div', null, 'a'), 'b');
}));
it('should throw if there are multiple children and a single argument is passed', fail(function () {
assertions.hasChildren(element('div', null, 'a', 'b'), 'a');
}));
it('should not throw when the fn does not throw for any node', function () {

@@ -191,0 +203,0 @@ assertions.hasChildren(element('div', null, 'a'), test);

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