mirror of
https://github.com/RGBCube/serenity
synced 2025-05-16 20:05:07 +00:00
Tests/LibWeb: Initialize Blob with string and read it from arrayBuffer()
This commit is contained in:
parent
b72489409a
commit
d9fb116bcc
2 changed files with 14 additions and 0 deletions
|
@ -0,0 +1,13 @@
|
|||
<script src="../include.js"></script>
|
||||
<script>
|
||||
asyncTest(async (done) => {
|
||||
const blob = new Blob(["This is some data to be read! 🦬"]);
|
||||
const arrayBuffer = await blob.arrayBuffer();
|
||||
const string = new TextDecoder().decode(new Uint8Array(arrayBuffer));
|
||||
if (string === "This is some data to be read! 🦬")
|
||||
println("PASS");
|
||||
else
|
||||
println("FAIL");
|
||||
done();
|
||||
});
|
||||
</script>
|
Loading…
Add table
Add a link
Reference in a new issue