Testing: Use React Testing Library (#27072)

* Add RTL

* Add setupTests.ts

* Refactor DashboardSearch tests
This commit is contained in:
Alex Khomenko
2020-08-20 16:21:42 +03:00
committed by GitHub
parent 3504009914
commit 6b2d44416d
7 changed files with 190 additions and 66 deletions

View File

@@ -12,6 +12,7 @@ module.exports = {
testRegex: '(\\.|/)(test)\\.(jsx?|tsx?)$',
moduleFileExtensions: ['ts', 'tsx', 'js', 'jsx', 'json'],
setupFiles: ['jest-canvas-mock', './public/test/jest-shim.ts', './public/test/jest-setup.ts'],
setupFilesAfterEnv: ['./public/test/setupTests.ts'],
snapshotSerializers: ['enzyme-to-json/serializer'],
globals: { 'ts-jest': { isolatedModules: true } },
moduleNameMapper: {