Skip to content

Commit

Permalink
add symlink for mocha
Browse files Browse the repository at this point in the history
  • Loading branch information
webzwo0i committed Jul 7, 2023
1 parent 5a3d2a1 commit 3c60bef
Show file tree
Hide file tree
Showing 5 changed files with 11 additions and 10 deletions.
3 changes: 0 additions & 3 deletions .github/workflows/backend-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -121,9 +121,6 @@ jobs:
-
name: Install all dependencies and symlink for ep_etherpad-lite
run: src/bin/installOnWindows.bat
-
name: Run npm i once to make bin files available - why is this needed at all?
run: npm i
-
name: Fix up the settings.json
run: |
Expand Down
7 changes: 2 additions & 5 deletions .github/workflows/windows.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,9 +37,6 @@ jobs:
name: Install all dependencies and symlink for ep_etherpad-lite
shell: msys2 {0}
run: src/bin/installDeps.sh
-
name: Run npm i once to make bin files available - why is this needed at all?
run: npm i
-
name: Run the backend tests
shell: msys2 {0}
Expand Down Expand Up @@ -118,11 +115,11 @@ jobs:
etherpad/src/bin/doc/package-lock.json
-
name: Install Cypress
run: cd etherpad && cd src && npm install cypress
run: cd etherpad && npm install cypress
-
name: Run Etherpad
run: |
cd etherpad
node node_modules\ep_etherpad-lite\node\server.js &
curl --connect-timeout 10 --max-time 20 --retry 5 --retry-delay 10 --retry-max-time 60 --retry-connrefused http://127.0.0.1:9001/p/test
src\node_modules\cypress\bin\cypress run --config-file src\tests\frontendcypress\cypress.config.js
node_modules\cypress\bin\cypress run --config-file src\tests\frontendcypress\cypress.config.js
2 changes: 2 additions & 0 deletions src/bin/installDeps.sh
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,8 @@ ln -s ../../node_modules/formidable src/node_modules/formidable
ln -s ../../node_modules/log4js src/node_modules/log4js
ln -s ../../node_modules/supertest src/node_modules/supertest

log "Adding symlink for mocha"
ln -s ../mocha/bin/_mocha node_modules/.bin/mocha

# Remove all minified data to force node creating it new
log "Clearing minified cache..."
Expand Down
5 changes: 5 additions & 0 deletions src/bin/installOnWindows.bat
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,11 @@ mklink /D "log4js" "..\..\node_modules\log4js"
mklink /D "supertest" "..\..\node_modules\supertest"
cd ..\..

echo Adding symlink for mocha
cd /D node_modules\.bin
mklink /D "mocha" "../mocha/bin/_mocha"


echo _
echo Setting up settings.json...
IF NOT EXIST settings.json (
Expand Down
4 changes: 2 additions & 2 deletions src/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -101,9 +101,9 @@
},
"scripts": {
"lint": "../node_modules/eslint/bin/eslint.js .",
"test": "../node_modules/mocha/bin/_mocha --timeout 120000 --recursive tests/backend/specs ../node_modules/ep_*/static/tests/backend/specs",
"test": "mocha --timeout 120000 --recursive tests/backend/specs ../node_modules/ep_*/static/tests/backend/specs",
"test-on-windows": "mocha --timeout 120000 --recursive tests/backend/specs ../node_modules/ep_*/static/tests/backend/specs",
"test-container": "../node_modules/mocha/bin/_mocha --timeout 5000 tests/container/specs/api",
"test-container": "mocha --timeout 5000 tests/container/specs/api",
"dev": "bash ./bin/run.sh"
},
"version": "1.9.1",
Expand Down

0 comments on commit 3c60bef

Please sign in to comment.