Comparing version 0.1.1 to 0.1.2
@@ -23,3 +23,3 @@ 'use strict'; | ||
*/ | ||
module.exports = function (chai, utils) { | ||
module.exports = function (chai) { | ||
var Assertion = chai.Assertion; | ||
@@ -59,2 +59,6 @@ | ||
}); | ||
chai.assert.equalBytes = function (value, expected, message) { | ||
return new Assertion(value, message, chai.assert.equalBytes, true).to.equalBytes(expected); | ||
}; | ||
}; |
{ | ||
"name": "chai-bytes", | ||
"version": "0.1.1", | ||
"version": "0.1.2", | ||
"description": "Chai assertions for byte arrays equality", | ||
@@ -16,8 +16,12 @@ "repository": { | ||
"main": "index.js", | ||
"types": "index.d.ts", | ||
"files": [ | ||
"index.js" | ||
"index.js", | ||
"index.d.ts" | ||
], | ||
"scripts": { | ||
"lint": "semistandard", | ||
"test": "mocha test", | ||
"test": "mocha test --exclude test/types.js", | ||
"test-browser": "karma start", | ||
"test-ts": "tsc -p test && node test/types.js", | ||
"coverage": "karma start && ./node_modules/.bin/lcov-result-merger 'coverage/*/lcov.info' coverage/lcov.info" | ||
@@ -36,11 +40,12 @@ }, | ||
"devDependencies": { | ||
"@types/chai": "^4.1.7", | ||
"babel-plugin-istanbul": "^4.1.4", | ||
"babelify": "^7.3.0", | ||
"browserify": "^14.4.0", | ||
"browserify": "^16.2.3", | ||
"chai": "^4.0.2", | ||
"coveralls": "^2.13.1", | ||
"karma": "^1.7.0", | ||
"karma-browserify": "^5.1.1", | ||
"karma-coverage": "^1.1.1", | ||
"karma-firefox-launcher": "^1.0.1", | ||
"coveralls": "^3.0.2", | ||
"karma": "^3.1.4", | ||
"karma-browserify": "^6.0.0", | ||
"karma-coverage": "^1.1.2", | ||
"karma-firefox-launcher": "^1.1.0", | ||
"karma-mocha": "^1.3.0", | ||
@@ -50,4 +55,5 @@ "karma-mocha-reporter": "^2.2.3", | ||
"lcov-result-merger": "^1.2.0", | ||
"mocha": "^3.4.2", | ||
"semistandard": "^11.0.0" | ||
"mocha": "^5.2.0", | ||
"semistandard": "^11.0.0", | ||
"typescript": "^3.2.2" | ||
}, | ||
@@ -54,0 +60,0 @@ "peerDependencies": { |
@@ -23,8 +23,9 @@ # Chai Assertions for Byte Arrays Equality | ||
```javascript | ||
const expect = require('chai') | ||
.use(require('chai-bytes')) | ||
.expect(); | ||
const { expect, assert } = require('chai') | ||
.use(require('chai-bytes')); | ||
var buffer = new Uint8Array([ 1, 2, 3, 4, 5 ]); | ||
const buffer = new Uint8Array([ 1, 2, 3, 4, 5 ]); | ||
expect(buffer).to.equalBytes('0102030405'); | ||
// `assert` style works, too | ||
assert.equalBytes(buffer, [1, 2, 3, 4, 5], 'error message'); | ||
``` | ||
@@ -52,3 +53,3 @@ | ||
(c) 2017 Alex Ostrovski | ||
(c) 2018 Alex Ostrovski | ||
@@ -55,0 +56,0 @@ **chai-bytes** is available under [Apache-2.0 license](LICENSE). |
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
17248
5
68
57
17