mirror of
https://github.com/kremalicious/metamask-extension.git
synced 2024-11-28 23:06:37 +01:00
e78e82205a
* Jestify migrations/ * Lint exclude migrations from mocha config, and add inclusion to jest config * Add migration tests to jest config * Exclude/ignore migration tests * Set process.env.IN_TEST to true when running tests locally
38 lines
870 B
JavaScript
38 lines
870 B
JavaScript
import migration33 from './033';
|
|
|
|
describe('Migration to delete notice controller', () => {
|
|
const oldStorage = {
|
|
meta: {},
|
|
data: {
|
|
NoticeController: {
|
|
noticesList: [
|
|
{
|
|
id: 0,
|
|
read: false,
|
|
date: 'Thu Feb 09 2017',
|
|
title: 'Terms of Use',
|
|
body: 'notice body',
|
|
},
|
|
{
|
|
id: 2,
|
|
read: false,
|
|
title: 'Privacy Notice',
|
|
body: 'notice body',
|
|
},
|
|
{
|
|
id: 4,
|
|
read: false,
|
|
title: 'Phishing Warning',
|
|
body: 'notice body',
|
|
},
|
|
],
|
|
},
|
|
},
|
|
};
|
|
|
|
it('removes notice controller from state', async () => {
|
|
const newStorage = await migration33.migrate(oldStorage);
|
|
expect(newStorage.data.NoticeController).toBeUndefined();
|
|
});
|
|
});
|