diff --git a/tests/main.test.ts b/tests/main.test.ts index 3ed7fc272..32db6ec23 100644 --- a/tests/main.test.ts +++ b/tests/main.test.ts @@ -271,7 +271,7 @@ it(`shouldn't allow using regular Yarn commands on npm-configured projects`, asy await expect(runCli(cwd, [`yarn`, `--version`])).resolves.toMatchObject({ exitCode: 1, - stderr: expect.stringContaining(`This project is configured to use npm`), + stderr: /This project is configured to use npm/, }); }); }); @@ -419,7 +419,7 @@ it(`should refuse to run a different package manager within a configured project await expect(runCli(cwd, [`pnpm`, `--version`])).resolves.toMatchObject({ stdout: ``, - stderr: expect.stringContaining(`This project is configured to use yarn`), + stderr: /This project is configured to use yarn/, exitCode: 1, }); @@ -470,7 +470,7 @@ it(`should support disabling the network accesses from the environment`, async ( await expect(runCli(cwd, [`yarn`, `--version`])).resolves.toMatchObject({ stdout: ``, - stderr: expect.stringContaining(`Network access disabled by the environment`), + stderr: /Network access disabled by the environment/, exitCode: 1, }); });