You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am writing a somewhat low-level util method for my backend service that relies on AsyncLocalStorage for Dependency Injection. When I want to test services that rely on this method, I want to create the AsyncLocalStorage store from a beforeEach or beforeAll method, maybe even a global setup file. However, in each individual test case, it seems like that context is gone (the store resolves to undefined).
What is the feature you are proposing to solve the problem?
not really a new feature - the test runner should ideally work in a way where it keeps context across the entire test run lifecycle
What alternatives have you considered?
No response
The text was updated successfully, but these errors were encountered:
actually, it looks like this issue is not Bun's fault. Bun is behaving according to the spec - but the AsyncLocalStorage spec is unintuitive for use-cases like this. See nodejs/node#53037 for more context. Closing as out of scope for Bun
What is the problem this feature would solve?
I am writing a somewhat low-level util method for my backend service that relies on AsyncLocalStorage for Dependency Injection. When I want to test services that rely on this method, I want to create the AsyncLocalStorage store from a
beforeEach
orbeforeAll
method, maybe even a globalsetup
file. However, in each individual test case, it seems like that context is gone (the store resolves to undefined).What is the feature you are proposing to solve the problem?
not really a new feature - the test runner should ideally work in a way where it keeps context across the entire test run lifecycle
What alternatives have you considered?
No response
The text was updated successfully, but these errors were encountered: