修改未完成
This commit is contained in:
@@ -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");
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user