From fba491f2c4e878cc9c7ae9788d9316cb21e30e01 Mon Sep 17 00:00:00 2001 From: Armand Philippot Date: Thu, 24 Mar 2022 15:53:30 +0100 Subject: build: configure jest Since Next.js v12, Jest is already configured with the next/jest package. I also added a package to mock next/router. --- package.json | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'package.json') diff --git a/package.json b/package.json index 48c10da..f61f8e7 100644 --- a/package.json +++ b/package.json @@ -30,6 +30,7 @@ "i18n:extract": "formatjs extract 'src/**/*.ts*' --out-file src/i18n/en.json", "release": "standard-version -s", "test": "jest", + "test:ci": "jest --ci", "test:coverage": "jest --coverage", "test:watch": "jest --watch" }, @@ -60,7 +61,9 @@ "@commitlint/config-conventional": "^16.2.1", "@formatjs/cli": "^4.8.2", "@svgr/webpack": "^6.2.1", + "@testing-library/jest-dom": "^5.16.3", "@testing-library/react": "^12.1.4", + "@testing-library/user-event": "^13.5.0", "@types/mdx": "^2.0.1", "@types/node": "^17.0.21", "@types/prismjs": "^1.26.0", @@ -70,11 +73,12 @@ "eslint-config-next": "^12.1.0", "eslint-config-prettier": "^8.5.0", "eslint-plugin-formatjs": "^3.0.0", + "eslint-plugin-testing-library": "^5.1.0", "husky": "^7.0.4", "jest": "^27.5.1", "lint-staged": "^12.3.5", + "next-router-mock": "^0.6.5", "prettier": "^2.5.1", - "react-test-renderer": "^17.0.2", "sass": "^1.49.9", "standard-version": "^9.3.2", "stylelint": "^14.5.3", -- cgit v1.2.3