Skip to content
This repository has been archived by the owner on Jun 2, 2022. It is now read-only.

Commit

Permalink
test: using yarn instead of npm on e2e test's dependency installation
Browse files Browse the repository at this point in the history
  • Loading branch information
SSen committed Feb 6, 2021
1 parent 0b7530a commit 779c4cf
Showing 1 changed file with 16 additions and 16 deletions.
32 changes: 16 additions & 16 deletions packages/test/e2e.sh
Original file line number Diff line number Diff line change
Expand Up @@ -96,31 +96,31 @@ function createTmpFixture() {
echo "FIXTURE: $1"
echo "TEMP: $TEMP";
echo "PWD: $(pwd)";
npm install --legacy-peer-deps > /dev/null;
yarn install --registry "$LOCAL_REGISTRY_URL" > /dev/null;
}

# webpack-dev-server

createTmpFixture webpack-dev-server/basic;
npm install @ssen/webpack-dev-server@e2e --legacy-peer-deps --save-dev --registry "$LOCAL_REGISTRY_URL" > /dev/null;
(PORT=$TEST_SERVER_PORT npm run start &> log.txt &);
yarn add @ssen/webpack-dev-server@e2e --dev --registry "$LOCAL_REGISTRY_URL" > /dev/null;
(PORT=$TEST_SERVER_PORT yarn run start &> log.txt &);
sleep 15s;
is200 "http://localhost:$TEST_SERVER_PORT";
stopTestServer;

# web

createTmpFixture web/start;
npm install @rocket-scripts/web@e2e --legacy-peer-deps --save-dev --registry "$LOCAL_REGISTRY_URL" > /dev/null;
yarn add @rocket-scripts/web@e2e --dev --registry "$LOCAL_REGISTRY_URL" > /dev/null;

(PORT=$TEST_SERVER_PORT npm run start &> log.txt &);
(PORT=$TEST_SERVER_PORT yarn run start &> log.txt &);
sleep 15s;
is200 "http://localhost:$TEST_SERVER_PORT";
is200 "http://localhost:$TEST_SERVER_PORT/manifest.json";
is200 "http://localhost:$TEST_SERVER_PORT/favicon.ico";
stopTestServer;

npm run build;
yarn run build;
fileExists "$TEMP"/out/app/manifest.json;
fileExists "$TEMP"/out/app/size-report.html;
fileExists "$TEMP"/out/app/favicon.ico;
Expand All @@ -130,9 +130,9 @@ fileExists "$TEMP"/out/app/vendor.*.js;


createTmpFixture web/worker;
npm install @rocket-scripts/web@e2e --legacy-peer-deps --save-dev --registry "$LOCAL_REGISTRY_URL" > /dev/null;
yarn add @rocket-scripts/web@e2e --dev --registry "$LOCAL_REGISTRY_URL" > /dev/null;

npm run build;
yarn run build;
fileExists "$TEMP"/out/app/manifest.json;
fileExists "$TEMP"/out/app/size-report.html;
fileExists "$TEMP"/out/app/favicon.ico;
Expand All @@ -143,16 +143,16 @@ fileExists "$TEMP"/out/app/*.worker.js;


createTmpFixture web/webpack-config;
npm install @rocket-scripts/web@e2e --legacy-peer-deps --save-dev --registry "$LOCAL_REGISTRY_URL" > /dev/null;
yarn add @rocket-scripts/web@e2e --dev --registry "$LOCAL_REGISTRY_URL" > /dev/null;

(PORT=$TEST_SERVER_PORT npm run start &> log.txt &);
(PORT=$TEST_SERVER_PORT yarn run start &> log.txt &);
sleep 15s;
is200 "http://localhost:$TEST_SERVER_PORT";
is200 "http://localhost:$TEST_SERVER_PORT/manifest.json";
is200 "http://localhost:$TEST_SERVER_PORT/favicon.ico";
stopTestServer;

npm run build;
yarn run build;
fileExists "$TEMP"/out/app/manifest.json;
fileExists "$TEMP"/out/app/size-report.html;
fileExists "$TEMP"/out/app/favicon.ico;
Expand All @@ -161,17 +161,17 @@ fileExists "$TEMP"/out/app/index.html;


createTmpFixture web/static-file-directories;
npm install @rocket-scripts/web@e2e --legacy-peer-deps --save-dev --registry "$LOCAL_REGISTRY_URL" > /dev/null;
yarn add @rocket-scripts/web@e2e --dev --registry "$LOCAL_REGISTRY_URL" > /dev/null;

(PORT=$TEST_SERVER_PORT npm run start &> log.txt &);
(PORT=$TEST_SERVER_PORT yarn run start &> log.txt &);
sleep 15s;
is200 "http://localhost:$TEST_SERVER_PORT";
is200 "http://localhost:$TEST_SERVER_PORT/manifest.json";
is200 "http://localhost:$TEST_SERVER_PORT/favicon.ico";
is200 "http://localhost:$TEST_SERVER_PORT/hello.json";
stopTestServer;

npm run build;
yarn run build;
fileExists "$TEMP"/out/app/manifest.json;
fileExists "$TEMP"/out/app/size-report.html;
fileExists "$TEMP"/out/app/favicon.ico;
Expand All @@ -181,9 +181,9 @@ fileExists "$TEMP"/out/app/hello.json;


createTmpFixture web/proxy;
npm install @rocket-scripts/web@e2e --legacy-peer-deps --save-dev --registry "$LOCAL_REGISTRY_URL" > /dev/null;
yarn add @rocket-scripts/web@e2e --dev --registry "$LOCAL_REGISTRY_URL" > /dev/null;

(PORT=$TEST_SERVER_PORT npm run start &> log.txt &);
(PORT=$TEST_SERVER_PORT yarn run start &> log.txt &);
sleep 15s;
is200 "http://localhost:$TEST_SERVER_PORT";
is200 "http://localhost:$TEST_SERVER_PORT/manifest.json";
Expand Down

0 comments on commit 779c4cf

Please sign in to comment.