Files
vercel/packages/build-utils/jest.config.js
Nathan Rajlich f036162aa3 [build-utils] Convert unit.test to TypeScript and fix jest types in VS Code (#6527)
Makes the `test/unit.test.ts` file be TypeScript, and import from the source TypeScript code. This way, we don't need to run `yarn build` to test local changes when testing.

Also, VS Code was complaining about the types for jest `describe()`/`it()` not being installed, even though they are. After some digging, I found that TypeScript has a peculiar behavior with types in monorepo setups. [This solution](https://github.com/microsoft/TypeScript-Node-Starter/issues/196#issuecomment-771988960) describing adding a `tsconfig.json` inside of the `tests` dir seems to do the trick.
2021-07-28 20:49:42 +00:00

6 lines
136 B
JavaScript

/** @type {import('@ts-jest/dist/types').InitialOptionsTsJest} */
module.exports = {
preset: 'ts-jest',
testEnvironment: 'node',
};