diff --git a/__tests__/integration.js b/__tests__/integration.js index fa897e0731..666dfeab81 100644 --- a/__tests__/integration.js +++ b/__tests__/integration.js @@ -12,7 +12,7 @@ jasmine.DEFAULT_TIMEOUT_INTERVAL = 120000; const path = require('path'); -function addTest(pattern, {strict} = {strict: false}, yarnArgs: Array = []) { +function addTest(pattern, {strictPeers} = {strictPeers: false}, yarnArgs: Array = []) { test.concurrent(`yarn add ${pattern}`, async () => { const cwd = await makeTemp(); const cacheFolder = path.join(cwd, 'cache'); @@ -31,8 +31,8 @@ function addTest(pattern, {strict} = {strict: false}, yarnArgs: Array = ); const result = await execa(command, ['add', pattern].concat(args), options); - if (strict) { - expect(result.stderr).not.toMatch(/^warning /gm); + if (strictPeers) { + expect(result.stderr).not.toMatch(/^warning .+ peer dependency/gm); } await fs.unlink(cwd); @@ -60,7 +60,7 @@ addTest('https://git@github.com/stevemao/left-pad.git'); // git url, with userna addTest('https://github.com/yarnpkg/yarn/releases/download/v0.18.1/yarn-v0.18.1.tar.gz'); // tarball addTest('https://github.com/bestander/chrome-app-livereload.git'); // no package.json addTest('bestander/chrome-app-livereload'); // no package.json, github, tarball -addTest('react-scripts@1.0.13', {strict: true}, ['--no-node-version-check', '--ignore-engines']); // many peer dependencies, there shouldn't be any peerDep warnings +addTest('react-scripts@1.0.13', {strictPeers: true}, ['--no-node-version-check', '--ignore-engines']); // many peer dependencies, there shouldn't be any peerDep warnings const MIN_PORT_NUM = 56000; const MAX_PORT_NUM = 65535;