File: inDelta.js

package info (click to toggle)
node-d3-shape 1.2.0-2
  • links: PTS, VCS
  • area: main
  • in suites: buster
  • size: 1,388 kB
  • sloc: makefile: 11; sh: 2
file content (10 lines) | stat: -rw-r--r-- 271 bytes parent folder | download | duplicates (21)
1
2
3
4
5
6
7
8
9
10
var tape = require("tape");

tape.Test.prototype.inDelta = function(actual, expected) {
  this._assert(expected - 1e-6 < actual && actual < expected + 1e-6, {
    message: "should be in delta",
    operator: "inDelta",
    actual: actual,
    expected: expected
  });
};