Map-constructor-4.js (254B)
1 // new Map(x) throws if x is not iterable (unless x is undefined). 2 3 load(libdir + "asserts.js"); 4 var nonIterables = [true, 1, -0, 3.14, NaN, {}, Math, this]; 5 for (let k of nonIterables) 6 assertThrowsInstanceOf(function () { new Map(k); }, TypeError);