1
0
mirror of https://github.com/kremalicious/metamask-extension.git synced 2024-12-01 21:57:06 +01:00
metamask-extension/test/unit/migrations/033-test.js
Erik Marks 76a2a9bb8b
@metamask/eslint config@5.0.0 (#10358)
* @metamask/eslint-config@5.0.0
* Update eslintrc and prettierrc
* yarn lint:fix
2021-02-04 10:15:23 -08:00

40 lines
943 B
JavaScript

import assert from 'assert';
import migration33 from '../../../app/scripts/migrations/033';
describe('Migration to delete notice controller', function () {
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', function () {
migration33.migrate(oldStorage).then((newStorage) => {
assert.equal(newStorage.data.NoticeController, undefined);
});
});
});