![Create React App Officially Deprecated Amid React 19 Compatibility Issues](https://cdn.sanity.io/images/cgdhsj6q/production/04fa08cf844d798abc0e1a6391c129363cc7e2ab-1024x1024.webp?w=400&fit=max&auto=format)
Security News
Create React App Officially Deprecated Amid React 19 Compatibility Issues
Create React App is officially deprecated due to React 19 issues and lack of maintenance—developers should switch to Vite or other modern alternatives.
jest-runner-tsd
Advanced tools
jest-runner-tsd
A Jest runner that tests typescript typings using tsd under the hood.
Install jest-runner-tsd
yarn add --dev jest-runner-tsd
# or with NPM
npm install --save-dev jest-runner-tsd
Create a jest.config.types.js
file and have the runner property set to jest-runner-tsd
as shown below:
module.exports = {
runner: 'jest-runner-tsd',
};
In the project package.json
file, modify the scripts block to use the configuration file as show below:
...
"scripts": {
...
"type-tests": "yarn jest --config jest.config.types.js"
}
...
To start the test, just execute the following command
yarn test-types
This runner uses TSD. To see the available assertions, checkout it's documentation
There are multiple ways you can pass a type definition file.
The type definitions should be in a file named index.d.ts
in the root directory of the project by default.
types
property in package.jsonYou can also set your types
property in package.json. The runner will automatically pick the type defintion file from there.
{
...
"types": "path/to/types.d.ts"
}
If the type definition file is located somewhere else then specify its path in the top of respective test file using the @type
inside a docblock.
/**
* @type ../../custom/path/to/types.d.ts
**/
Note: This is only a workaround. A stable solution may be introduced in future.
Due to limitations in TSD, the only solution now for testing types in TypeScript projects would be to have a empty type definition file and specify it's path using one of the many methods explained above.
FAQs
Run your TypeScript type tests using Jest
The npm package jest-runner-tsd receives a total of 0 weekly downloads. As such, jest-runner-tsd popularity was classified as not popular.
We found that jest-runner-tsd demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 2 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Create React App is officially deprecated due to React 19 issues and lack of maintenance—developers should switch to Vite or other modern alternatives.
Security News
Oracle seeks to dismiss fraud claims in the JavaScript trademark dispute, delaying the case and avoiding questions about its right to the name.
Security News
The Linux Foundation is warning open source developers that compliance with global sanctions is mandatory, highlighting legal risks and restrictions on contributions.