This commit is contained in:
19
src/services/storyEngine/saveMigrationManifest.test.ts
Normal file
19
src/services/storyEngine/saveMigrationManifest.test.ts
Normal file
@@ -0,0 +1,19 @@
|
||||
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');
|
||||
});
|
||||
});
|
||||
Reference in New Issue
Block a user