From 11dc1d023d1db63e9efbb320ddaeec9a91c45fb4 Mon Sep 17 00:00:00 2001 From: Steven D Vachon Date: Wed, 26 Apr 2017 23:56:03 -0400 Subject: [PATCH] Add cross-realm Date support --- lib/chai-subset.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/chai-subset.js b/lib/chai-subset.js index 456d72b..c20f7a7 100644 --- a/lib/chai-subset.js +++ b/lib/chai-subset.js @@ -58,8 +58,8 @@ }); } - if (expected instanceof Date) { - if (actual instanceof Date) { + if (toString.call(expected) === '[object Date]') { + if (toString.call(actual) === '[object Date]') { return expected.getTime() === actual.getTime(); } else { return false;