From 299ae644b4f70bce47884a3220129e8cea9f636a Mon Sep 17 00:00:00 2001 From: Antoine Caron Date: Fri, 8 May 2020 17:45:39 +0200 Subject: [PATCH] chore(jest/circleci): setup test report for units (#23851) Co-authored-by: Michal Piechowiak --- .circleci/config.yml | 8 +++++++- package.json | 2 +- yarn.lock | 13 ++++++++++++- 3 files changed, 20 insertions(+), 3 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index e9cb76b19fc48..c98f83b808313 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -66,7 +66,13 @@ aliases: - run: ./scripts/assert-changed-files.sh "packages/*|.circleci/*" - <<: *attach_to_bootstrap - run: yarn list react - - run: node --max-old-space-size=2048 ./node_modules/.bin/jest -w 1 --ci + - run: + command: node --max-old-space-size=2048 ./node_modules/.bin/jest -w 1 --ci --reporters=jest-junit + environment: + JEST_JUNIT_OUTPUT_DIR: ./test-results/jest-node/ + JEST_JUNIT_OUTPUT_NAME: results.xml + - store_test_results: + path: ./test-results/jest-node/ e2e-test-workflow: &e2e-test-workflow filters: diff --git a/package.json b/package.json index bc12b5b839c41..0c6fbe5776ada 100644 --- a/package.json +++ b/package.json @@ -52,7 +52,7 @@ "jest": "^24.9.0", "jest-cli": "^24.9.0", "jest-environment-jsdom-fourteen": "^0.1.0", - "jest-junit": "^6.4.0", + "jest-junit": "^10.0.0", "jest-serializer-path": "^0.1.15", "jest-silent-reporter": "^0.2.1", "joi": "^14.3.1", diff --git a/yarn.lock b/yarn.lock index ab9f19e594550..7929b7ff50c87 100644 --- a/yarn.lock +++ b/yarn.lock @@ -14477,6 +14477,17 @@ jest-jasmine2@^24.9.0: pretty-format "^24.9.0" throat "^4.0.0" +jest-junit@^10.0.0: + version "10.0.0" + resolved "https://registry.yarnpkg.com/jest-junit/-/jest-junit-10.0.0.tgz#c94b91c24920a327c9d2a075e897b2dba4af494b" + integrity sha512-dbOVRyxHprdSpwSAR9/YshLwmnwf+RSl5hf0kCGlhAcEeZY9aRqo4oNmaT0tLC16Zy9D0zekDjWkjHGjXlglaQ== + dependencies: + jest-validate "^24.9.0" + mkdirp "^0.5.1" + strip-ansi "^5.2.0" + uuid "^3.3.3" + xml "^1.0.1" + jest-junit@^6.4.0: version "6.4.0" resolved "https://registry.yarnpkg.com/jest-junit/-/jest-junit-6.4.0.tgz#23e15c979fa6338afde46f2d2ac2a6b7e8cf0d9e" @@ -25036,7 +25047,7 @@ utils-merge@1.0.1: version "1.0.1" resolved "https://registry.yarnpkg.com/utils-merge/-/utils-merge-1.0.1.tgz#9f95710f50a267947b2ccc124741c1028427e713" -uuid@3.4.0, uuid@^3.4.0: +uuid@3.4.0, uuid@^3.3.3, uuid@^3.4.0: version "3.4.0" resolved "https://registry.yarnpkg.com/uuid/-/uuid-3.4.0.tgz#b23e4358afa8a202fe7a100af1f5f883f02007ee" integrity sha512-HjSDRw6gZE5JMggctHBcjVak08+KEVhSIiDzFnT9S9aegmp85S/bReBVTb4QTFaRNptJ9kuYaNhnbNEOkbKb/A==