From 09461d2ad8ef5da4f025ab4a6a70247955c624e8 Mon Sep 17 00:00:00 2001 From: Noisekit Date: Mon, 28 Oct 2024 17:05:09 +1100 Subject: [PATCH] Use mocha-multi reporter --- .circleci/config.yml | 10 +++++--- package.json | 1 + yarn.lock | 57 +++++++++++++++++++++++++++++++++++++++++++- 3 files changed, 64 insertions(+), 4 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 8f352222a..6ab88a39b 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -338,10 +338,14 @@ jobs: GAS_REPORT: "./gas-<< parameters.chain-id >>-<< parameters.preset >>.csv" command: | TEST_FILES=$(circleci tests glob 'e2e/tests/<< parameters.toml >>/*.e2e.js') - echo "$TEST_FILES" | circleci tests run --verbose --split-by=timings --command="xargs yarn mocha --no-bail --exit --reporter mocha-junit-reporter --reporter-options mochaFile=tmp/junit.xml,outputs=true,toConsole=true" + echo "$TEST_FILES" | circleci tests run --verbose --split-by=timings --command="xargs yarn mocha --no-bail --exit --reporter mocha-multi --reporter-options spec=-,junit=/tmp/junit.xml" - store_test_results: - path: "./tmp/junit.xml" + path: "/tmp/junit.xml" + + - store_artifacts: + path: "/tmp/junit.xml" + destination: "junit.xml" - store_artifacts: path: "./debug-<< parameters.chain-id >>-<< parameters.preset >>.log" @@ -422,7 +426,7 @@ jobs: GAS_REPORT: "./gas-<< parameters.chain-id >>-<< parameters.preset >>.csv" command: | TEST_FILES=$(circleci tests glob 'e2e/tests/<< parameters.toml >>/*.e2e.js') - echo "$TEST_FILES" | circleci tests run --verbose --split-by=timings --command="xargs yarn mocha --no-bail --exit --reporter mocha-junit-reporter --reporter-options mochaFile=tmp/junit.xml,outputs=true,toConsole=true" + echo "$TEST_FILES" | circleci tests run --verbose --split-by=timings --command="xargs yarn mocha --no-bail --exit --reporter mocha-multi --reporter-options spec=-,mocha-junit-reporter=tmp/junit.xml" - store_test_results: path: "./tmp/junit.xml" diff --git a/package.json b/package.json index a1ba0618b..189442150 100644 --- a/package.json +++ b/package.json @@ -61,6 +61,7 @@ "hardhat": "^2.22.14", "mocha": "^10.7.3", "mocha-junit-reporter": "^2.2.1", + "mocha-multi": "^1.1.7", "numbro": "^2.5.0", "pako": "^2.1.0", "prettier": "^3.3.3", diff --git a/yarn.lock b/yarn.lock index 148a59a12..c5ca3c549 100644 --- a/yarn.lock +++ b/yarn.lock @@ -2570,6 +2570,22 @@ __metadata: languageName: node linkType: hard +"has-symbols@npm:^1.0.3": + version: 1.0.3 + resolution: "has-symbols@npm:1.0.3" + checksum: 10/464f97a8202a7690dadd026e6d73b1ceeddd60fe6acfd06151106f050303eaa75855aaa94969df8015c11ff7c505f196114d22f7386b4a471038da5874cf5e9b + languageName: node + linkType: hard + +"has-tostringtag@npm:^1.0.0": + version: 1.0.2 + resolution: "has-tostringtag@npm:1.0.2" + dependencies: + has-symbols: "npm:^1.0.3" + checksum: 10/c74c5f5ceee3c8a5b8bc37719840dc3749f5b0306d818974141dda2471a1a2ca6c8e46b9d6ac222c5345df7a901c9b6f350b1e6d62763fec877e26609a401bfe + languageName: node + linkType: hard + "hash-base@npm:^3.0.0": version: 3.1.0 resolution: "hash-base@npm:3.1.0" @@ -2939,6 +2955,15 @@ __metadata: languageName: node linkType: hard +"is-string@npm:^1.0.4": + version: 1.0.7 + resolution: "is-string@npm:1.0.7" + dependencies: + has-tostringtag: "npm:^1.0.0" + checksum: 10/2bc292fe927493fb6dfc3338c099c3efdc41f635727c6ebccf704aeb2a27bca7acb9ce6fd34d103db78692b10b22111a8891de26e12bfa1c5e11e263c99d1fef + languageName: node + linkType: hard + "is-unicode-supported@npm:^0.1.0": version: 0.1.0 resolution: "is-unicode-supported@npm:0.1.0" @@ -3162,6 +3187,13 @@ __metadata: languageName: node linkType: hard +"lodash.once@npm:^4.1.1": + version: 4.1.1 + resolution: "lodash.once@npm:4.1.1" + checksum: 10/202f2c8c3d45e401b148a96de228e50ea6951ee5a9315ca5e15733d5a07a6b1a02d9da1e7fdf6950679e17e8ca8f7190ec33cae47beb249b0c50019d753f38f3 + languageName: node + linkType: hard + "lodash.truncate@npm:^4.4.2": version: 4.4.2 resolution: "lodash.truncate@npm:4.4.2" @@ -3489,7 +3521,7 @@ __metadata: languageName: node linkType: hard -"mkdirp@npm:^1.0.3": +"mkdirp@npm:^1.0.3, mkdirp@npm:^1.0.4": version: 1.0.4 resolution: "mkdirp@npm:1.0.4" bin: @@ -3531,6 +3563,21 @@ __metadata: languageName: node linkType: hard +"mocha-multi@npm:^1.1.7": + version: 1.1.7 + resolution: "mocha-multi@npm:1.1.7" + dependencies: + debug: "npm:^4.1.1" + is-string: "npm:^1.0.4" + lodash.once: "npm:^4.1.1" + mkdirp: "npm:^1.0.4" + object-assign: "npm:^4.1.1" + peerDependencies: + mocha: ">=2.2.0 <7 || >=9" + checksum: 10/848a6ced811c4a1595b7db94a92deb5cad8b044832af9ec9a2a5ba94101272445ad5fb1bf973762f3afa4db28dc66cfe919648a2d3f1068ca6e27ee85f1f93db + languageName: node + linkType: hard + "mocha@npm:^10.0.0, mocha@npm:^10.7.3": version: 10.7.3 resolution: "mocha@npm:10.7.3" @@ -3748,6 +3795,13 @@ __metadata: languageName: node linkType: hard +"object-assign@npm:^4.1.1": + version: 4.1.1 + resolution: "object-assign@npm:4.1.1" + checksum: 10/fcc6e4ea8c7fe48abfbb552578b1c53e0d194086e2e6bbbf59e0a536381a292f39943c6e9628af05b5528aa5e3318bb30d6b2e53cadaf5b8fe9e12c4b69af23f + languageName: node + linkType: hard + "obliterator@npm:^2.0.0": version: 2.0.4 resolution: "obliterator@npm:2.0.4" @@ -4655,6 +4709,7 @@ __metadata: hardhat: "npm:^2.22.14" mocha: "npm:^10.7.3" mocha-junit-reporter: "npm:^2.2.1" + mocha-multi: "npm:^1.1.7" numbro: "npm:^2.5.0" pako: "npm:^2.1.0" prettier: "npm:^3.3.3"