diff --git a/packages/pnpm/test/cli.ts b/packages/pnpm/test/cli.ts index 7662fa0cb3..287df2f35c 100644 --- a/packages/pnpm/test/cli.ts +++ b/packages/pnpm/test/cli.ts @@ -18,7 +18,7 @@ test('some commands pass through to npm', () => { const result = execPnpmSync(['dist-tag', 'ls', 'is-positive']) expect(result.status).toBe(0) - expect(result.stdout.toString()).not.toMatch(/Usage: pnpm [command] [flags]/) + expect(result.stdout.toString()).not.toContain('Usage: pnpm [command] [flags]') }) test('installs in the folder where the package.json file is', async () => { diff --git a/packages/read-project-manifest/test/index.ts b/packages/read-project-manifest/test/index.ts index b3031b637a..fb6a296a56 100644 --- a/packages/read-project-manifest/test/index.ts +++ b/packages/read-project-manifest/test/index.ts @@ -118,8 +118,8 @@ test('fail on invalid JSON', async () => { expect(err).toBeTruthy() expect(err['code']).toBe('ERR_PNPM_JSON_PARSE') - // eslint-disable-next-line - expect(err.message).toMatch(/^Unexpected string in JSON at position 20 while parsing \'{ "name": "foo" "version": "1.0.0"}\' in /) + + expect(err.message).toContain('Unexpected string in JSON at position 20 while parsing \'{ "name": "foo" "version": "1.0.0"}\' in ') }) test('fail on invalid JSON5', async () => {