From 778f77f6e9d894bcd4b943270d5fd1e94788615b Mon Sep 17 00:00:00 2001 From: Jordan Harband Date: Sat, 12 Dec 2015 12:56:32 -0800 Subject: [PATCH] [Tests] Fix new tests from ca2e21f064e76128cb828f500374286c46af4b4e in node 0.12 (#4) --- test/native.js | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/test/native.js b/test/native.js index 786d8e7..59117af 100644 --- a/test/native.js +++ b/test/native.js @@ -285,13 +285,15 @@ test('iterables', function (t) { st.notOk(isEqual(b, c), 'unequal Set (b, c) are not equal'); st.test('Sets with strings as iterables', function (sst) { - var ab = new Set('ab'); + var ab; + try { ab = new Set('ab'); } catch (e) { ab = new Set(); } // node 0.12 throws when given a string if (ab.size !== 2) { // work around IE 11 (and others) bug accepting iterables ab.add('a'); ab.add('b'); } - var ac = new Set('ac'); + var ac; + try { ac = new Set('ac'); } catch (e) { ac = new Set(); } // node 0.12 throws when given a string if (ab.size !== 2) { // work around IE 11 (and others) bug accepting iterables ab.add('a');