feat(planner): add bridge target version strategy for auto-stamping ledger to app versions
This commit is contained in:
@@ -145,6 +145,21 @@ tap.test('constructor: rejects s3 backend without bucket', async () => {
|
||||
expect(caught!.code).toEqual('LEDGER_BACKEND_MISMATCH');
|
||||
});
|
||||
|
||||
tap.test('constructor: rejects invalid targetVersionStrategy', async () => {
|
||||
let caught: SmartMigrationError | undefined;
|
||||
try {
|
||||
new SmartMigration({
|
||||
targetVersion: '1.0.0',
|
||||
db: {} as any,
|
||||
targetVersionStrategy: 'loose' as any,
|
||||
});
|
||||
} catch (err) {
|
||||
caught = err as SmartMigrationError;
|
||||
}
|
||||
expect(caught).toBeInstanceOf(SmartMigrationError);
|
||||
expect(caught!.code).toEqual('INVALID_TARGET_VERSION_STRATEGY');
|
||||
});
|
||||
|
||||
tap.test('step(): rejects empty id', async () => {
|
||||
const m = new SmartMigration({ targetVersion: '1.0.0', db: {} as any });
|
||||
expect(() => m.step('')).toThrow();
|
||||
|
||||
Reference in New Issue
Block a user