mirror of
https://github.com/kremalicious/metamask-extension.git
synced 2024-11-26 20:39:08 +01:00
f47cfbbb3e
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.
20 lines
416 B
JavaScript
20 lines
416 B
JavaScript
import { strict as assert } from 'assert';
|
|
import migrationTemplate from './template';
|
|
|
|
const storage = {
|
|
meta: {},
|
|
data: {},
|
|
};
|
|
|
|
describe('storage is migrated successfully', function () {
|
|
it('should work', function (done) {
|
|
migrationTemplate
|
|
.migrate(storage)
|
|
.then((migratedData) => {
|
|
assert.equal(migratedData.meta.version, 0);
|
|
done();
|
|
})
|
|
.catch(done);
|
|
});
|
|
});
|