[Pkg-javascript-commits] [node-jsonstream] 30/214: ignore trailing floating point rounding errors

Bastien Roucariès rouca at moszumanska.debian.org
Fri Dec 1 12:58:35 UTC 2017


This is an automated email from the git hooks/post-receive script.

rouca pushed a commit to branch master
in repository node-jsonstream.

commit 707a70545885634a48ead3d40926cadedd944132
Author: James Halliday <mail at substack.net>
Date:   Wed Jun 13 17:18:51 2012 -0700

    ignore trailing floating point rounding errors
---
 test/parsejson.js | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)

diff --git a/test/parsejson.js b/test/parsejson.js
index c509860..0279887 100644
--- a/test/parsejson.js
+++ b/test/parsejson.js
@@ -15,11 +15,14 @@ while (times --) {
 
   p.onValue = function (v) {
     console.error('parsed', v)
-    assert.equal(v, r)
+    assert.equal(
+      String(v).slice(0,12),
+      String(r).slice(0,12)
+    )
   }
   console.error('correct', r)
   p.write (new Buffer(JSON.stringify([r])))
 
 
 
-}
\ No newline at end of file
+}

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-javascript/node-jsonstream.git



More information about the Pkg-javascript-commits mailing list