gecko-dev/testing/web-platform/tests/compression/decompression-constructor-error.tentative.any.js
Anne van Kesteren ac18f8d13d Bug 1631482 [wpt PR 23117] - *.any.js: explicitly list defaults, part 1, a=testonly
Automatic update from web-platform-tests
*.any.js: explicitly list defaults, part 1 (#23117)

* *.any.js: explicitly list defaults, part 1

Helps with #23111.

* add a couple more
--

wpt-commits: e1e713c842e54ea0a9410ddc988b63d0e1d31973
wpt-pr: 23117
2020-04-28 11:46:33 +00:00

15 lines
557 B
JavaScript

// META: global=window,worker
'use strict';
test(t => {
assert_throws_js(TypeError, () => new DecompressionStream('a'), 'constructor should throw');
}, '"a" should cause the constructor to throw');
test(t => {
assert_throws_js(TypeError, () => new DecompressionStream(), 'constructor should throw');
}, 'no input should cause the constructor to throw');
test(t => {
assert_throws_js(Error, () => new DecompressionStream({ toString() { throw Error(); } }), 'constructor should throw');
}, 'non-string input should cause the constructor to throw');