Trying to migrate our codebase to bun. Sadly we can't use the built in bun test runner as we need to use mocks, which are currently unsupported. Our current test setup is jest, using the ts-jest preset in order to run them
As part of the initial configuration with bun, we updated our tsconfig, from:
However, with this updated tsconfig, both bun run test and npm run test now fail, as every import resolves to undefined, so code like this in test files fails
Hi there!
Trying to migrate our codebase to bun. Sadly we can't use the built in bun test runner as we need to use mocks, which are currently unsupported. Our current test setup is jest, using the
ts-jest
preset in order to run themAs part of the initial configuration with bun, we updated our tsconfig, from:
to
However, with this updated tsconfig, both
bun run test
andnpm run test
now fail, as every import resolves toundefined
, so code like this in test files failsas jsdom is undefined
Originally reported on Discord:
Running typescript jest tests with bun