20 lines
590 B
TypeScript
20 lines
590 B
TypeScript
import { describe, expect, it } from 'vitest';
|
|
|
|
import { applyStoryEngineMigration, buildSaveMigrationManifest } from './saveMigrationManifest';
|
|
|
|
describe('saveMigrationManifest', () => {
|
|
it('builds a manifest and applies migration defaults', () => {
|
|
const manifest = buildSaveMigrationManifest({
|
|
version: 'story-engine-v5',
|
|
});
|
|
const state = applyStoryEngineMigration({
|
|
state: {
|
|
storyEngineMemory: undefined,
|
|
} as never,
|
|
manifest,
|
|
});
|
|
|
|
expect(state.storyEngineMemory?.saveMigrationManifest?.version).toBe('story-engine-v5');
|
|
});
|
|
});
|