GitXplorerGitXplorer
t

should-approximately-deep

public
1 stars
0 forks
0 issues

Commits

List of commits on branch master.
Unverified
d80b5128932650acd39449d50b98d7c5cfa5ea2b

Create .travis.yml

ttargos committed 9 years ago
Unverified
0d865b1a457dfec6963dbcf349ef738baa5ceda6

trigger CI

ttargos committed 9 years ago
Unverified
da842f7ee34814262d05eea76eeeda503c133778

Update README.md

ttargos committed 9 years ago
Unverified
f9ab05f8eead36a679e1d8b121e0fc6df8f9795b

1.1.0

ttargos committed 9 years ago
Unverified
fac2478f31248951b47b02e4f230768b86cd062a

Accept array 'extensions'

ttargos committed 9 years ago
Unverified
a82452a89b5b0208e4157c3600c7d4dba3d22e34

release v1.0.1

ttargos committed 10 years ago

README

The README file for this repository.

should-approximately-deep

NPM version build status npm download

Extend should.js to assert arrays with approximate values

Installation

npm install should-approximately-deep --save-dev
require('should-approximately-deep');

Usage

approximatelyDeep(otherValue, delta)

Asserts if a chained object is a number or a (potentially multidimensional) array of numbers and that its values are near the ones from otherValue within the delta margin. Each array must have the same number of elements.

[1, 2, 3].should.be.approximatelyDeep([1, 2.01, 2.99], 0.1);
[1, 2, 3].should.not.be.approximatelyDeep([1, 2], 0.1);
[[1, 2, 3], [4, 5, 6]].should.be.approximatelyDeep([[1.05, 1.95, 3],[4, 4.98, 6]], 0.1);

License

MIT