Vitest `Failed to pop isolated storage stack frame` when error thrown

With a durable object as simple as:
export class FeedStorage extends DurableObject {
async test() { throw new Error("My impl is broken") }
}
export class FeedStorage extends DurableObject {
async test() { throw new Error("My impl is broken") }
}
And running tests through the vitest integration:
it('fetches feed', async () => {
const stub = env.FEED_STORAGE.get(env.FEED_STORAGE.idFromName('main'))
const res = await expect(() => stub.test()).rejects.toThrowError()
})
it('fetches feed', async () => {
const stub = env.FEED_STORAGE.get(env.FEED_STORAGE.idFromName('main'))
const res = await expect(() => stub.test()).rejects.toThrowError()
})
I end up with Vitest caught 1 unhandled error during the test run., and Failed to pop isolated storage stack frame I'd expect this to be propagated up through rpc as it is mentioned in the docs here so vitest can handle it. What is the suggested way to handle thrown errors in implementation in tests?
0 Replies
No replies yetBe the first to reply to this messageJoin

Did you find this page helpful?