Skip to content

Commit

Permalink
chore: workaround for pnpm issue
Browse files Browse the repository at this point in the history
  • Loading branch information
Lewis Thorley committed May 1, 2024
1 parent ea9cc99 commit b2ad221
Showing 1 changed file with 5 additions and 6 deletions.
11 changes: 5 additions & 6 deletions tests/integration/telemetry.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,6 @@ import { callCli } from './utils/call-cli.js'
import { cliPath } from './utils/cli-path.js'
import { MockApiTestContext, withMockApi } from './utils/mock-api-vitest.js'
import { withSiteBuilder } from './utils/site-builder.ts'
import { existsSync } from 'fs'

const isPnpm = existsSync('pnpm-lock.yaml')

const getCLIOptions = (apiUrl): Options => ({
env: {
Expand Down Expand Up @@ -77,7 +74,8 @@ await withMockApi(routes, async () => {
command: 'api',
monorepo: false,
nodejsVersion,
packageManager: isPnpm ? 'pnpm' : 'npm',
// TODO: this should be NPM however some CI tests are using pnpm which changes the value
packageManager: expect.stringMatching(/npm|pnpm/),
})
})

Expand All @@ -96,7 +94,7 @@ await withMockApi(routes, async () => {
command: 'dev:exec',
monorepo: false,
nodejsVersion,
packageManager: isPnpm ? 'pnpm' : 'npm',
packageManager: 'npm',
})
})

Expand All @@ -123,7 +121,8 @@ await withMockApi(routes, async () => {
command: 'api',
monorepo: false,
nodejsVersion,
packageManager: isPnpm ? 'pnpm' : 'npm',
// TODO: this should be NPM however some CI tests are using pnpm which changes the value
packageManager: expect.stringMatching(/npm|pnpm/),
})
})
})
Expand Down

0 comments on commit b2ad221

Please sign in to comment.