397777089e
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
21 lines
892 B
JavaScript
21 lines
892 B
JavaScript
// tools/test-rollback.test.mjs — TDD spec for the rollback planner.
|
|
// Plan: docs/superpowers/plans/2026-05-25-llm-first-router-overhaul.md Task 1 step 4.
|
|
import { describe, it, expect } from 'vitest';
|
|
import { planRollback } from './test-rollback.mjs';
|
|
|
|
describe('planRollback', () => {
|
|
it('restores git-tracked state via the pre-overhaul tag + lists user-level snapshots', () => {
|
|
const plan = planRollback();
|
|
expect(plan.gitTag).toBe('brain-pre-llm-bootstrap');
|
|
expect(plan.userLevelRestores.some((r) => r.to.includes('settings.json'))).toBe(true);
|
|
});
|
|
|
|
it('resets runtime flags from snapshot (not hardcoded list)', () => {
|
|
expect(planRollback().flagStrategy).toBe('restore-snapshot-delete-new');
|
|
});
|
|
|
|
it('lists episodes as PRESERVED, not reverted (G5/G6)', () => {
|
|
expect(planRollback().preserve.some((x) => x.includes('episodes'))).toBe(true);
|
|
});
|
|
});
|