mirror of
https://github.com/kremalicious/metamask-extension.git
synced 2024-12-13 05:07:12 +01:00
cb113dd2a6
The migration template has been converted to TypeScript. We can start writing migrations in TypeScript today; they have no dependencies on JavaScript modules.
14 lines
315 B
JavaScript
14 lines
315 B
JavaScript
import { migrate, version } from './template';
|
|
|
|
const storage = {
|
|
meta: { version: -1 },
|
|
data: {},
|
|
};
|
|
|
|
describe('storage is migrated successfully', () => {
|
|
it('should work', async () => {
|
|
const migratedData = await migrate(storage);
|
|
expect(migratedData.meta.version).toStrictEqual(version);
|
|
});
|
|
});
|