diff options
Diffstat (limited to 'testing/web-platform/tests/compression/decompression-constructor-error.tentative.any.js')
-rw-r--r-- | testing/web-platform/tests/compression/decompression-constructor-error.tentative.any.js | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/testing/web-platform/tests/compression/decompression-constructor-error.tentative.any.js b/testing/web-platform/tests/compression/decompression-constructor-error.tentative.any.js new file mode 100644 index 0000000000..1bd86ff5b5 --- /dev/null +++ b/testing/web-platform/tests/compression/decompression-constructor-error.tentative.any.js @@ -0,0 +1,15 @@ +// 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'); |