Migrate test inits from Promise to Effect (#25377)
This commit is contained in:
parent
becf57ee6a
commit
d99dde6306
6 changed files with 199 additions and 160 deletions
|
|
@ -252,4 +252,22 @@ describe("InstanceStore", () => {
|
|||
expect(() => Instance.current).toThrow()
|
||||
}),
|
||||
)
|
||||
|
||||
it.live("does not install legacy ALS around Effect init", () =>
|
||||
Effect.gen(function* () {
|
||||
const dir = yield* tmpdirScoped()
|
||||
|
||||
const directory = yield* Effect.promise(() =>
|
||||
Instance.provide({
|
||||
directory: dir,
|
||||
init: Effect.sync(() => {
|
||||
expect(() => Instance.current).toThrow()
|
||||
}),
|
||||
fn: () => Instance.directory,
|
||||
}),
|
||||
)
|
||||
|
||||
expect(directory).toBe(dir)
|
||||
}),
|
||||
)
|
||||
})
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue