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
Christopher Hiller edited this page Sep 2, 2025
·
1 revision
I want a factory function for expect() and expectAsync().
Let's call this function bootstrap(). It should live in src/bootstrap.ts. The code in src/expect.ts and src/expect-async.ts should move into this file.
bootstrap() will return an object with shape:
{expect: Expect,expectAsync: ExpectAsync}
This object will be destructured and exported from src/bootstrap.ts, then re-exported from src/index.ts as the expect and expectAsync functions.
There will be references to src/expect.js and src/expect-async.js in tests and perhaps other files; these will need to be updated to point at src/bootstrap.js. Other modules should not import anything from src/index.ts / src/index.js.