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
{{ message }}
This repository has been archived by the owner on May 22, 2024. It is now read-only.
Is it possible to use the context inside a stub ? It could be useful for use cases like this
import*astmpfrom'tmp-promise'import{fancy}from'fancy-test'import{expect}from'chai'describe('suite',()=>{fancy.add('tmpDir',()=>tmp.dir()).stub(process,'cwd',()=>ctx.tmpDir.path)//Use the context here.do(ctx=>expect(process.cwd()).to.equal(ctx.tmpDir.path)).finally(ctx=>ctx.tmpDir.cleanup()).it('use context in stub')})
The text was updated successfully, but these errors were encountered:
Is there any workaround to achieve something like this? Trying to use objects added to ctx to have more control over stubs, and would prefer not to use global state
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Hi there,
Is it possible to use the context inside a stub ? It could be useful for use cases like this
The text was updated successfully, but these errors were encountered: