blob: 2d5271c11d31f46ec79a382a2fd44aad2a4b79d9 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
|
// META: global=window,worker
'use strict';
test(t => {
assert_throws_js(TypeError, () => new CompressionStream('a'), 'constructor should throw');
}, '"a" should cause the constructor to throw');
test(t => {
assert_throws_js(TypeError, () => new CompressionStream(), 'constructor should throw');
}, 'no input should cause the constructor to throw');
test(t => {
assert_throws_js(Error, () => new CompressionStream({ toString() { throw Error(); } }), 'constructor should throw');
}, 'non-string input should cause the constructor to throw');
|