mirror of
https://github.com/kremalicious/metamask-extension.git
synced 2024-12-02 14:15:06 +01:00
3ba3b330f6
The `assert` module has two modes: "Legacy" and "strict". When using strict mode, the "strict" version of each assertion method is implied. Whereas in legacy mode, by default it will use the deprecated, "loose" version of each assertion. We now use strict mode everywhere. A few tests required updates where they were asserting the wrong thing, and it was passing beforehand due to the loose matching.
40 lines
927 B
JavaScript
40 lines
927 B
JavaScript
import { strict as assert } from 'assert';
|
|
import migration33 from './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);
|
|
});
|
|
});
|
|
});
|