Codebase list node-d3-shape / multiarch-fixes/main test / inDelta.js
multiarch-fixes/main

Tree @multiarch-fixes/main (Download .tar.gz)

inDelta.js @multiarch-fixes/mainraw · history · blame

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
  });
};