mirror of
https://github.com/bitwarden/browser
synced 2025-12-14 07:13:32 +00:00
[PM-5956] Delete Unused State (#8439)
* Delete Unused State * Delete One More * Add Migration to Delete InstalledVersion * Update Error
This commit is contained in:
@@ -0,0 +1,35 @@
|
||||
import { runMigrator } from "../migration-helper.spec";
|
||||
|
||||
import { DeleteInstalledVersion } from "./52-delete-installed-version";
|
||||
|
||||
describe("DeleteInstalledVersion", () => {
|
||||
const sut = new DeleteInstalledVersion(51, 52);
|
||||
|
||||
describe("migrate", () => {
|
||||
it("can delete data if there", async () => {
|
||||
const output = await runMigrator(sut, {
|
||||
authenticatedAccounts: ["user1"],
|
||||
global: {
|
||||
installedVersion: "2024.1.1",
|
||||
},
|
||||
});
|
||||
|
||||
expect(output).toEqual({
|
||||
authenticatedAccounts: ["user1"],
|
||||
global: {},
|
||||
});
|
||||
});
|
||||
|
||||
it("will run if installed version is not there", async () => {
|
||||
const output = await runMigrator(sut, {
|
||||
authenticatedAccounts: ["user1"],
|
||||
global: {},
|
||||
});
|
||||
|
||||
expect(output).toEqual({
|
||||
authenticatedAccounts: ["user1"],
|
||||
global: {},
|
||||
});
|
||||
});
|
||||
});
|
||||
});
|
||||
Reference in New Issue
Block a user