From 3cecb0bbef8c1f33e8d430fed4ec34c713cd5806 Mon Sep 17 00:00:00 2001 From: Clay Jensen-Reimann Date: Wed, 12 Jul 2023 12:31:49 -0500 Subject: [PATCH] fix broken test cases --- package-lock.json | 20 ++++++++++++-------- package.json | 2 +- test/mocha-junit-reporter-spec.js | 4 ++-- 3 files changed, 15 insertions(+), 11 deletions(-) diff --git a/package-lock.json b/package-lock.json index 500abb0..03e8535 100644 --- a/package-lock.json +++ b/package-lock.json @@ -5,12 +5,13 @@ "requires": true, "packages": { "": { + "name": "mocha-junit-reporter", "version": "2.2.0", "license": "MIT", "dependencies": { "debug": "^4.3.4", "md5": "^2.3.0", - "mkdirp": "~1.0.4", + "mkdirp": "^3.0.0", "strip-ansi": "^6.0.1", "xml": "^1.0.1" }, @@ -1791,14 +1792,17 @@ "dev": true }, "node_modules/mkdirp": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-1.0.4.tgz", - "integrity": "sha512-vVqVZQyf3WLx2Shd0qJ9xuvqgAyKPLAiqITEtqW0oIUjzo3PePDd6fW9iFz30ef7Ysp/oiWqbhszeGWW2T6Gzw==", + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-3.0.1.tgz", + "integrity": "sha512-+NsyUUAZDmo6YVHzL/stxSu3t9YS1iljliy3BSDrXJ/dkn1KYdmtZODGGjLcc9XLgVVpH4KshHB8XmZgMhaBXg==", "bin": { - "mkdirp": "bin/cmd.js" + "mkdirp": "dist/cjs/src/bin.js" }, "engines": { "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" } }, "node_modules/mocha": { @@ -5968,9 +5972,9 @@ "dev": true }, "mkdirp": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-1.0.4.tgz", - "integrity": "sha512-vVqVZQyf3WLx2Shd0qJ9xuvqgAyKPLAiqITEtqW0oIUjzo3PePDd6fW9iFz30ef7Ysp/oiWqbhszeGWW2T6Gzw==" + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-3.0.1.tgz", + "integrity": "sha512-+NsyUUAZDmo6YVHzL/stxSu3t9YS1iljliy3BSDrXJ/dkn1KYdmtZODGGjLcc9XLgVVpH4KshHB8XmZgMhaBXg==" }, "mocha": { "version": "9.1.3", diff --git a/package.json b/package.json index e26cfd2..ad0f028 100644 --- a/package.json +++ b/package.json @@ -44,7 +44,7 @@ "dependencies": { "debug": "^4.3.4", "md5": "^2.3.0", - "mkdirp": "~1.2.6", + "mkdirp": "^3.0.0", "strip-ansi": "^6.0.1", "xml": "^1.0.1" }, diff --git a/test/mocha-junit-reporter-spec.js b/test/mocha-junit-reporter-spec.js index 144be50..3ca484b 100644 --- a/test/mocha-junit-reporter-spec.js +++ b/test/mocha-junit-reporter-spec.js @@ -321,7 +321,7 @@ describe('mocha-junit-reporter', function() { reporter.runner, dir + "results." + - reporter._testsuites[0].testsuite[0]._attr.file + + (reporter._testsuites[0]?.testsuite[0]?._attr?.file ?? 'suiteFileName') + ".xml" ); done(); @@ -337,7 +337,7 @@ describe('mocha-junit-reporter', function() { reporter.runner, dir + "results." + - reporter._testsuites[1].testsuite[0]._attr.name + + (reporter._testsuites[1]?.testsuite[0]?._attr?.name ?? 'suiteName') + ".xml" ); done();