chai-arrays
Advanced tools
Comparing version 1.1.0 to 2.0.0
@@ -82,9 +82,9 @@ module.exports = { | ||
"max-len": "off", | ||
"max-lines": "error", | ||
"max-lines": "off", | ||
"max-nested-callbacks": "error", | ||
"max-params": "error", | ||
"max-statements": "error", | ||
"max-statements": "off", | ||
"max-statements-per-line": "error", | ||
"multiline-ternary": "error", | ||
"new-cap": "error", | ||
"new-cap": "off", | ||
"new-parens": "error", | ||
@@ -91,0 +91,0 @@ "newline-after-var": [ |
@@ -71,2 +71,34 @@ const doesContain = function(array, element) { | ||
chai.Assertion.addMethod('Uint8Array', function() { | ||
this.assert( | ||
this._obj instanceof Uint8Array, | ||
'expected #{this} to be an Uint8Array', | ||
'expected #{this} not to be an Uint8Array' | ||
); | ||
}); | ||
chai.Assertion.addMethod('Uint16Array', function() { | ||
this.assert( | ||
this._obj instanceof Uint16Array, | ||
'expected #{this} to be an Uint16Array', | ||
'expected #{this} not to be an Uint16Array' | ||
); | ||
}); | ||
chai.Assertion.addMethod('Uint32Array', function() { | ||
this.assert( | ||
this._obj instanceof Uint32Array, | ||
'expected #{this} to be an Uint32Array', | ||
'expected #{this} not to be an Uint32Array' | ||
); | ||
}); | ||
chai.Assertion.addMethod('Uint8ClampedArray', function() { | ||
this.assert( | ||
this._obj instanceof Uint8ClampedArray, | ||
'expected #{this} to be an Uint8ClampedArray', | ||
'expected #{this} not to be an Uint8ClampedArray' | ||
); | ||
}); | ||
chai.Assertion.addMethod('sorted', function(sortfn) { | ||
@@ -73,0 +105,0 @@ this.assert( |
{ | ||
"name": "chai-arrays", | ||
"version": "1.1.0", | ||
"version": "2.0.0", | ||
"description": "a simple chai plugin for better array assertions", | ||
@@ -5,0 +5,0 @@ "main": "assertArrays.js", |
@@ -30,2 +30,7 @@ # chai-arrays [![CircleCI](https://circleci.com/gh/GaneshSPatil/chai-arrays.svg?style=shield)](https://circleci.com/gh/GaneshSPatil/chai-arrays) | ||
expect('foobar').not.to.be.array(); | ||
expect(new Uint8Array([1])).to.be.Uint8Array(); | ||
expect(new Uint16Array([1])).to.be.Uint16Array(); | ||
expect(new Uint32Array([1])).to.be.Uint32Array(); | ||
expect(new Uint8ClampedArray([1])).to.be.Uint8ClampedArray(); | ||
``` | ||
@@ -32,0 +37,0 @@ |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
94
25044
5
340