From 58a3de8e80234d72d58fa886c4a56249724ab2d5 Mon Sep 17 00:00:00 2001 From: Rhys Evans Date: Sat, 3 Aug 2024 16:15:50 +0100 Subject: [PATCH 1/2] build: store test results --- .circleci/config.yml | 2 ++ package.json | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index a8f1a8b3..eaec95bb 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -71,6 +71,8 @@ jobs: steps: - *workspace - run: npm run test:ci + - store_test_results + path: test-results nodefetch3: <<: *nodelts diff --git a/package.json b/package.json index 59172fcb..d427eedd 100644 --- a/package.json +++ b/package.json @@ -32,7 +32,7 @@ "prepare": "husky || echo \"husky not available\"", "build": "npm run build -w=packages", "docs": "npm run start -w docs", - "test:ci": "vitest .", + "test:ci": "vitest . --reporter=junit", "test:legacy": "vitest ./packages/fetch-mock/test/specs", "test": "vitest --ui .", "test:coverage": "vitest run --coverage ./packages/**/src/__tests__", From 6388ede33d5c84a5bc2d18a2d2f6ff5febfabb77 Mon Sep 17 00:00:00 2001 From: Rhys Evans Date: Sat, 3 Aug 2024 16:20:37 +0100 Subject: [PATCH 2/2] build: actually save test results --- .circleci/config.yml | 2 +- .gitignore | 1 + package.json | 2 +- 3 files changed, 3 insertions(+), 2 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index eaec95bb..f0e08d5d 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -71,7 +71,7 @@ jobs: steps: - *workspace - run: npm run test:ci - - store_test_results + - store_test_results: path: test-results nodefetch3: diff --git a/.gitignore b/.gitignore index 4b70ef47..d9fccf42 100644 --- a/.gitignore +++ b/.gitignore @@ -15,3 +15,4 @@ coverage/ /packages/**/dist import-compat/ts-*.js +test-results diff --git a/package.json b/package.json index d427eedd..3fba8e88 100644 --- a/package.json +++ b/package.json @@ -32,7 +32,7 @@ "prepare": "husky || echo \"husky not available\"", "build": "npm run build -w=packages", "docs": "npm run start -w docs", - "test:ci": "vitest . --reporter=junit", + "test:ci": "vitest . --reporter=junit --outputFile=test-results/junit.xml", "test:legacy": "vitest ./packages/fetch-mock/test/specs", "test": "vitest --ui .", "test:coverage": "vitest run --coverage ./packages/**/src/__tests__",