From 5169161d932ce126af7078a45821ca5714b35b99 Mon Sep 17 00:00:00 2001 From: Tom Payne Date: Tue, 19 Mar 2013 07:39:52 +0100 Subject: [PATCH] Extend equalArray to consider NaNs to be equal --- test/expect-0.2.0-ol3/expect.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/test/expect-0.2.0-ol3/expect.js b/test/expect-0.2.0-ol3/expect.js index 2fe81d4575..6c2ec48248 100644 --- a/test/expect-0.2.0-ol3/expect.js +++ b/test/expect-0.2.0-ol3/expect.js @@ -522,7 +522,8 @@ if (equal) { var j = 0; for (j = 0; j < other.length; ++j) { - if (this.obj[j] !== other[j]) { + if (this.obj[j] !== other[j] && + !(isNaN(this.obj[j]) && isNaN(other[j]))) { equal = false; break; }