A Metamask fork with Infura removed and default networks editable
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
ciphermask/app/scripts/migrations/046.test.js

52 lines
1.1 KiB

import migration46 from './046';
describe('migration #46', () => {
it('should update the version metadata', async () => {
const oldStorage = {
meta: {
version: 45,
},
data: {},
};
const newStorage = await migration46.migrate(oldStorage);
expect(newStorage.meta).toStrictEqual({
version: 46,
});
});
it('should delete ABTestController state', async () => {
const oldStorage = {
meta: {},
data: {
ABTestController: {
abTests: {
fullScreenVsPopup: 'control',
},
},
foo: 'bar',
},
};
const newStorage = await migration46.migrate(oldStorage);
expect(newStorage.data).toStrictEqual({
foo: 'bar',
});
});
it('should do nothing if ABTestController state does not exist', async () => {
const oldStorage = {
meta: {},
data: {
AppStateController: {
bar: 'baz',
},
foo: 'bar',
},
};
const newStorage = await migration46.migrate(oldStorage);
expect(oldStorage.data).toStrictEqual(newStorage.data);
});
});