feat: add cohesive e2e tests for the web terminal, apps, and workspaces (#8140)

* feat: add cohesive e2e tests for the web terminal, apps, and workspaces

* Fix web terminal flake
This commit is contained in:
Kyle Carberry
2023-06-22 00:21:40 +00:00
committed by GitHub
parent 2a492b7008
commit d434181941
36 changed files with 1537 additions and 158 deletions
+1 -1
View File
@@ -15,7 +15,7 @@ test("tar", async () => {
group: "codergroup",
mode: parseInt("777", 8),
})
const blob = await writer.write()
const blob = (await writer.write()) as Blob
// Read
const reader = new TarReader()
+6 -1
View File
@@ -232,7 +232,12 @@ export class TarWriter {
view.set(data, offset + 512)
offset += 512 + 512 * Math.floor((item.size + 511) / 512)
}
return new Blob([this.buffer], { type: "application/x-tar" })
// Required so it works in the browser and node.
if (typeof Blob !== "undefined") {
return new Blob([this.buffer], { type: "application/x-tar" })
} else {
return this.buffer
}
}
private writeString(str: string, offset: number, size: number) {