mirror of
https://github.com/LukeHagar/vercel.git
synced 2025-12-08 04:22:09 +00:00
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.
6 lines
136 B
JavaScript
6 lines
136 B
JavaScript
/** @type {import('@ts-jest/dist/types').InitialOptionsTsJest} */
|
|
module.exports = {
|
|
preset: 'ts-jest',
|
|
testEnvironment: 'node',
|
|
};
|