修改未完成

This commit is contained in:
rain
2026-07-29 18:15:59 +08:00
parent 6fbcf21024
commit 8c2355a52c
59 changed files with 7995 additions and 1118 deletions
+5 -14
View File
@@ -31,20 +31,10 @@ const run = async () => {
success("/tmp/image.jpg");
},
},
io: {
resolveLocalFileSystemURL(_path, success) {
success({
file(done) {
done({ name: "image.jpg", size: 4, type: "image/jpeg" });
},
});
},
FileReader: class {
readAsArrayBuffer() {
this.result = new Uint8Array([1, 2, 3, 4]).buffer;
this.onloadend({ target: { result: this.result } });
}
},
};
globalThis.uni = {
getFileInfo(options) {
options.success({ size: 4, digest: "a".repeat(32) });
},
};
assert.deepStrictEqual(await pickAndUploadImage(), {
@@ -54,6 +44,7 @@ const run = async () => {
fileName: "image.jpg",
});
delete globalThis.plus;
delete globalThis.uni;
delete globalThis.__appApi;
process.stdout.write("RESUMABLE-IMAGE-UPLOAD-RUNTIME-SMOKE PASS\n");
};