From 31d324bafca0ba52d323c3ff776c044c6321ee9c Mon Sep 17 00:00:00 2001 From: Kamil Kisiela Date: Wed, 19 Jun 2019 13:32:31 +0200 Subject: [PATCH] Use junit --- .circleci/config.yml | 2 ++ .gitignore | 1 + jest.config.js | 11 +++++++++++ package.json | 4 ++++ 4 files changed, 18 insertions(+) diff --git a/.circleci/config.yml b/.circleci/config.yml index f9bc60b..594a954 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -19,6 +19,8 @@ jobs: - run: name: Test command: yarn test + - store_test_results: + path: test-results - save_cache: key: dependency-cache-{{ checksum "package.json" }} paths: diff --git a/.gitignore b/.gitignore index 27ce545..57cd986 100644 --- a/.gitignore +++ b/.gitignore @@ -7,5 +7,6 @@ npm-debug.log node_modules dist +test-results .env .vscode diff --git a/jest.config.js b/jest.config.js index f4dd688..af68d82 100644 --- a/jest.config.js +++ b/jest.config.js @@ -3,4 +3,15 @@ module.exports = { setupFiles: [ '/test/polyfills.js', ], + reporters: [ + 'default', + [ + 'jest-junit', + { + classNameTemplate: '{classname}', + titleTemplate: '{title}', + addFileAttribute: 'true', + }, + ], + ], }; diff --git a/package.json b/package.json index a8d13d1..84040d9 100644 --- a/package.json +++ b/package.json @@ -60,6 +60,7 @@ "eslint-plugin-react": "^7.11.1", "graphql": "^14.0.2", "jest": "^23.6.0", + "jest-junit": "6.4.0", "rollup": "^0.67.1", "rollup-plugin-babel": "^4.0.3", "rollup-plugin-commonjs": "^9.2.0", @@ -69,5 +70,8 @@ }, "publishConfig": { "access": "public" + }, + "jest-junit": { + "outputDirectory": "test-results" } }