Skip to content

Commit

Permalink
Merge branch 'main' into 1418
Browse files Browse the repository at this point in the history
  • Loading branch information
rbnayax committed Jun 12, 2024
2 parents a5a92a5 + f34082d commit 3be761d
Show file tree
Hide file tree
Showing 3 changed files with 32 additions and 5 deletions.
2 changes: 2 additions & 0 deletions src/package-managers/yarn.ts
Original file line number Diff line number Diff line change
Expand Up @@ -294,3 +294,5 @@ export const patch = withNpmConfigFromYarn(npm.patch)
export const semver = withNpmConfigFromYarn(npm.semver)

export default spawnYarn

export { getPeerDependencies, packageAuthorChanged } from './npm'
24 changes: 20 additions & 4 deletions test/doctor.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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')
Expand Down Expand Up @@ -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')
Expand Down
11 changes: 10 additions & 1 deletion test/helpers/doctorHelpers.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 3be761d

Please sign in to comment.