mirror of
https://github.com/servo/servo.git
synced 2025-06-25 09:34:32 +01:00
15 lines
551 B
JavaScript
15 lines
551 B
JavaScript
// 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');
|