decompression-constructor-error.any.js (569B)
1 // META: global=window,worker,shadowrealm 2 3 'use strict'; 4 5 test(t => { 6 assert_throws_js(TypeError, () => new DecompressionStream('a'), 'constructor should throw'); 7 }, '"a" should cause the constructor to throw'); 8 9 test(t => { 10 assert_throws_js(TypeError, () => new DecompressionStream(), 'constructor should throw'); 11 }, 'no input should cause the constructor to throw'); 12 13 test(t => { 14 assert_throws_js(Error, () => new DecompressionStream({ toString() { throw Error(); } }), 'constructor should throw'); 15 }, 'non-string input should cause the constructor to throw');