Thu, 22 Jan 2015 13:21:57 +0100
Incorporate requested changes from Mozilla in review: https://bugzilla.mozilla.org/show_bug.cgi?id=1123480#c6
1 // Map(x) throws if x is not iterable (unless x is undefined).
2
3 load(libdir + "asserts.js");
4 var nonIterables = [null, true, 1, -0, 3.14, NaN, {}, Math, this];
5 for (let k of nonIterables)
6 assertThrowsInstanceOf(function () { Map(k); }, TypeError);