Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP

Loading…

Change the position of the if. #2

Merged
merged 1 commit into from

2 participants

@ogom

Hi,

this plugin to chai for stats is for me the best.
Since the test failed, change the position of the if.

Regards,
Ogom

@logicalparadox

Sorry about that... must have been a vim key-slip.

@logicalparadox logicalparadox merged commit 9aa066c into chaijs:master
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Commits on Jul 31, 2012
  1. @ogom

    change the position of the if

    ogom authored
This page is out of date. Refresh to see the latest.
Showing with 2 additions and 2 deletions.
  1. +1 −1  chai-stats.js
  2. +1 −1  lib/stats.js
View
2  chai-stats.js
@@ -177,8 +177,8 @@ module.exports = function (chai, _) {
Assertion.overwriteMethod('eql', function (_super) {
return function eql (exp, precision) {
if (flag(this, 'almost')) {
- var act = flag(this, 'object')
if (null == precision) precision = 7;
+ var act = flag(this, 'object')
, tol = 0.5 * Math.pow(10, -precision);
function deepEql (act, exp) {
View
2  lib/stats.js
@@ -66,8 +66,8 @@ module.exports = function (chai, _) {
Assertion.overwriteMethod('eql', function (_super) {
return function eql (exp, precision) {
if (flag(this, 'almost')) {
- var act = flag(this, 'object')
if (null == precision) precision = 7;
+ var act = flag(this, 'object')
, tol = 0.5 * Math.pow(10, -precision);
function deepEql (act, exp) {
Something went wrong with that request. Please try again.