diff --git a/.c8rc.json b/.c8rc.json index a3b22aa6e..42378c4d6 100644 --- a/.c8rc.json +++ b/.c8rc.json @@ -19,6 +19,6 @@ "clover": {"file": "coverage.clover.xml"}, "html": {"subdir": "coverage.html"} }, - "reports-dir": "./reports", + "reports-dir": "./reports/coverage", "temp-directory": "./.c8.cache" } diff --git a/.github/workflows/nodejs.yml b/.github/workflows/nodejs.yml index a6ff46fc6..c6e717b4a 100644 --- a/.github/workflows/nodejs.yml +++ b/.github/workflows/nodejs.yml @@ -138,8 +138,8 @@ jobs: - name: collect coverage if: ${{ failure() || success() }} run: > - npx c8 report - --reporter clover + npx c8 report + --reporter clover --reports-dir '${{ env.REPORTS_DIR }}/coverage/${{ matrix.os }}_node${{ matrix.node-version }}' - name: artifact test reports if: ${{ ! cancelled() }} diff --git a/src/serialize/json/normalize.ts b/src/serialize/json/normalize.ts index d6a799e92..3e800caa6 100644 --- a/src/serialize/json/normalize.ts +++ b/src/serialize/json/normalize.ts @@ -340,9 +340,11 @@ export class LicenseNormalizer extends BaseJsonNormalizer { return this.#normalizeSpdxLicense(data as Models.SpdxLicense, options) case data instanceof Models.LicenseExpression: return this.#normalizeLicenseExpression(data as Models.LicenseExpression) + /* c8 ignore start */ default: // this case is not expected to happen - and therefore is undocumented throw new TypeError('Unexpected LicenseChoice') + /* c8 ignore end */ } } diff --git a/src/serialize/xml/normalize.ts b/src/serialize/xml/normalize.ts index ad4064451..a6ae9ae01 100644 --- a/src/serialize/xml/normalize.ts +++ b/src/serialize/xml/normalize.ts @@ -436,9 +436,11 @@ export class LicenseNormalizer extends BaseXmlNormalizer { return this.#normalizeSpdxLicense(data as Models.SpdxLicense, options) case data instanceof Models.LicenseExpression: return this.#normalizeLicenseExpression(data as Models.LicenseExpression) + /* c8 ignore start */ default: // this case is not expected to happen - and therefore is undocumented throw new TypeError('Unexpected LicenseChoice') + /* c8 ignore end */ } }