Skip to content

Commit 4a48857

Browse files
committed
another test
1 parent 5b717a0 commit 4a48857

File tree

1 file changed

+21
-0
lines changed

1 file changed

+21
-0
lines changed

app/scripts/migrations/190.test.ts

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,4 +48,25 @@ describe(`migration #${VERSION}`, () => {
4848
expect(versionedData.data).toStrictEqual(oldStorage.data);
4949
expect(changedKeys.size).toBe(0);
5050
});
51+
52+
it('handles state when seedWords property does not exist', async () => {
53+
const oldStorage = {
54+
meta: { version: OLD_VERSION },
55+
data: {
56+
PreferencesController: {
57+
showTestNetworks: true,
58+
},
59+
},
60+
};
61+
62+
const versionedData = cloneDeep(oldStorage);
63+
const changedKeys = new Set<string>();
64+
65+
await migrate(versionedData, changedKeys);
66+
67+
expect(versionedData.meta.version).toBe(VERSION);
68+
expect('seedWords' in versionedData.data).toBe(false);
69+
expect(versionedData.data).toStrictEqual(oldStorage.data);
70+
expect(changedKeys.size).toBe(0);
71+
});
5172
});

0 commit comments

Comments
 (0)