refactor(flags): migrate skip migrations flag (#27705)
This commit is contained in:
parent
7b370406a9
commit
356f684186
5 changed files with 36 additions and 6 deletions
|
|
@ -26,4 +26,13 @@ describe("Database.getChannelPath", () => {
|
|||
expect(Database.getChannelPath(flags)).toBe(path.join(Global.Path.data, "opencode.db"))
|
||||
}).pipe(Effect.provide(RuntimeFlags.layer({ disableChannelDb: true }))),
|
||||
)
|
||||
|
||||
it.effect("accepts RuntimeFlags with skipMigrations for database callers", () =>
|
||||
Effect.gen(function* () {
|
||||
const flags = yield* RuntimeFlags.Service
|
||||
|
||||
expect(flags.skipMigrations).toBe(true)
|
||||
expect(Database.getChannelPath(flags)).toBe(Database.getChannelPath({ disableChannelDb: flags.disableChannelDb }))
|
||||
}).pipe(Effect.provide(RuntimeFlags.layer({ skipMigrations: true }))),
|
||||
)
|
||||
})
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue