From 6eb3f33078035d3cfd106f535808b998cf714815 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ma=C3=ABl=20Nison?= Date: Fri, 28 Sep 2018 17:55:14 +0200 Subject: [PATCH] Adds an e2e test for when using PnP --- .travis.yml | 2 +- appveyor.yml | 2 +- tasks/e2e-installs.sh | 12 ++++++++++++ 3 files changed, 14 insertions(+), 2 deletions(-) diff --git a/.travis.yml b/.travis.yml index fd83ef7393e..e2e384a6f85 100644 --- a/.travis.yml +++ b/.travis.yml @@ -9,7 +9,7 @@ cache: directories: - .npm before_install: - - curl -o- -L https://yarnpkg.com/install.sh | bash + - curl -o- -L https://yarnpkg.com/install.sh | bash -s -- --nightly - export PATH="$HOME/.yarn/bin:$PATH" install: true script: diff --git a/appveyor.yml b/appveyor.yml index 4fc634b5331..b8420b71583 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -36,7 +36,7 @@ platform: install: - ps: Install-Product node $env:nodejs_version $env:platform - ps: | - (New-Object Net.WebClient).DownloadFile("https://yarnpkg.com/latest.msi", "$env:temp\yarn.msi") + (New-Object Net.WebClient).DownloadFile("https://nightly.yarnpkg.com/latest.msi", "$env:temp\yarn.msi") cmd /c start /wait msiexec.exe /i $env:temp\yarn.msi /quiet /qn /norestart build: off diff --git a/tasks/e2e-installs.sh b/tasks/e2e-installs.sh index 642e4f671a9..c0776c84efc 100755 --- a/tasks/e2e-installs.sh +++ b/tasks/e2e-installs.sh @@ -229,5 +229,17 @@ npx create-react-app test-app-nested-paths-t3/aa/bb/cc/dd cd test-app-nested-paths-t3/aa/bb/cc/dd yarn start --smoke-test +# ****************************************************************************** +# Test when PnP is enabled +# ****************************************************************************** +cd "$temp_app_path" +echo $OSTYPE +YARN_PLUGNPLAY_OVERRIDE=1 npx create-react-app test-app-pnp +cd test-app-pnp +! exists node_modules +exists .pnp.js +yarn start --smoke-test +yarn build + # Cleanup cleanup