diff --git a/src/package-managers/yarn.ts b/src/package-managers/yarn.ts index 96c84031..d47ad158 100644 --- a/src/package-managers/yarn.ts +++ b/src/package-managers/yarn.ts @@ -294,3 +294,5 @@ export const patch = withNpmConfigFromYarn(npm.patch) export const semver = withNpmConfigFromYarn(npm.semver) export default spawnYarn + +export { getPeerDependencies, packageAuthorChanged } from './npm' diff --git a/test/doctor.test.ts b/test/doctor.test.ts index ff52445b..ac797d8a 100644 --- a/test/doctor.test.ts +++ b/test/doctor.test.ts @@ -109,8 +109,16 @@ describe('doctor', function () { await fs.rm(lockfilePath, { recursive: true, force: true }) await fs.rm(nodeModulesPath, { recursive: true, force: true }) - // stderr should be empty - stderr.should.equal('') + stderr = stripAnsi(stderr).trim() + if (stderr !== '') { + stderr.should.equal(`> test +> node test.js + + + +> test +> node test.js`) + } // stdout should include normal output stripAnsi(stdout).should.containIgnoreCase('Tests pass') @@ -154,8 +162,16 @@ describe('doctor', function () { await fs.rm(lockfilePath, { recursive: true, force: true }) await fs.rm(nodeModulesPath, { recursive: true, force: true }) - // stderr should be empty - stderr.should.equal('') + stderr = stripAnsi(stderr).trim() + if (stderr !== '') { + stripAnsi(stderr).should.equal(`> test +> echo 'Test Success' + + + +> test +> echo 'Test Success'`) + } // stdout should include normal output stripAnsi(stdout).should.containIgnoreCase('Tests pass') diff --git a/test/helpers/doctorHelpers.ts b/test/helpers/doctorHelpers.ts index 6fce3601..1e04c674 100644 --- a/test/helpers/doctorHelpers.ts +++ b/test/helpers/doctorHelpers.ts @@ -77,7 +77,16 @@ export const testPass = ({ packageManager }: { packageManager: PackageManagerNam if (packageManager === 'bun') { stripAnsi(stderr).should.equal('$ echo Success\n\n$ echo Success\n\n') } else { - stderr.should.equal('') + stderr = stripAnsi(stderr).trim() + if (stderr !== '') { + stderr.should.equal(`> test +> echo Success + + + +> test +> echo Success`) + } } // stdout should include normal output