feat: update migration test page (#2871)

This commit is contained in:
Alex Yang
2023-06-28 16:46:08 +08:00
parent fc36aac0fb
commit 72378abe56
3 changed files with 60 additions and 1 deletions
@@ -20,6 +20,7 @@ import {
downloadBinary,
getMilestones,
markMilestone,
overwriteBinary,
revertUpdate,
setMergeCount,
} from '../index';
@@ -488,4 +489,17 @@ describe('utils', () => {
}, 0)
);
});
test('overwrite binary', async () => {
await overwriteBinary('test', new Uint8Array([1, 2, 3]));
{
const binary = await downloadBinary('test');
expect(binary).toEqual(new Uint8Array([1, 2, 3]));
}
await overwriteBinary('test', new Uint8Array([0, 0]));
{
const binary = await downloadBinary('test');
expect(binary).toEqual(new Uint8Array([0, 0]));
}
});
});