Categories
Mastering Development

Property ‘toBeInTheDocument’ does not exist on type ‘Matchers

Trying to setup testing for a components library. I’ve tried many example and all similar threads on this with no luck. My setupTests.ts file is correctly being loaded (proven with a console.log), and the library seems to be available as if I add import { toBeInTheDocument } from ‘@testing-library/jest-dom/matchers’ and log toBeInTheDocument it is present. […]

Categories
Development

Why create-react-app alias is not able to find index.js from folder?

I am stuck up with a weird issue while creating alias for my app. I am trying to create the alias adding jsconfig.json what looks like { “compilerOptions”: { “lib”: [ “dom”, “es2015”, “es2016”, “es6”, “es2017” ], “target”: “es2017”, “module”: “es6”, “allowSyntheticDefaultImports”: true, “baseUrl”: “./”, “paths”: { “actions/*”: [“src/actions/*”], “public/*”: [“public/*”], “components/*”: [“src/components/*”], “containers/*”: [“src/containers/*”], […]