create-react-app-typescript icon indicating copy to clipboard operation
create-react-app-typescript copied to clipboard

Using jest-extended?

Open ziriax opened this issue 7 years ago • 1 comments

I guess it is not possible using to use jest-extended without ejecting?

ziriax avatar Oct 26 '18 21:10 ziriax

At least it should work without ejecting.

According to the docs of that package, jest-extended should be added via the setupTestFrameworkScriptFile configuration of jest. By default, the template picks up <rootDir>/src/testSetup.ts automatically, if it is present: https://github.com/wmonk/create-react-app-typescript/blob/eb346884132b5e7ce1a59cb415070be94e95ea15/scripts/utils/createJestConfig.js#L17-L19

jest-extended in particular also comes with proper typings.

DorianGrey avatar Nov 01 '18 07:11 DorianGrey