mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 23:07:35 +00:00
Tests/LibWeb: Verify setting {readable,writable}Type throws RangeError
This test proves that setting transformer.{readable,writable}Type to a value throws a RangeError.
This commit is contained in:
parent
221f18f72e
commit
1f4f750052
2 changed files with 21 additions and 0 deletions
|
@ -0,0 +1,2 @@
|
|||
'readableType' => Exception raised of RangeError
|
||||
'writableType' => Exception raised of RangeError
|
|
@ -0,0 +1,19 @@
|
|||
<script src="../include.js"></script>
|
||||
<script>
|
||||
test(() => {
|
||||
try {
|
||||
new TransformStream({
|
||||
readableType: 'bytes',
|
||||
});
|
||||
} catch (e) {
|
||||
println(`'readableType' => Exception raised of ${e.constructor.name}`);
|
||||
}
|
||||
try {
|
||||
new TransformStream({
|
||||
writableType: 'bytes',
|
||||
});
|
||||
} catch (e) {
|
||||
println(`'writableType' => Exception raised of ${e.constructor.name}`);
|
||||
}
|
||||
});
|
||||
</script>
|
Loading…
Add table
Add a link
Reference in a new issue