mirror of
https://github.com/kremalicious/metamask-extension.git
synced 2024-12-12 20:57:12 +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);
|
|
});
|
|
});
|