mirror of
https://github.com/coder/coder.git
synced 2026-09-24 15:04:27 +08:00
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:
@@ -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()
|
||||
|
||||
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user