Commit Graph

24 Commits

Author SHA1 Message Date
Richard Hansen 8b28e00784 restructure: Prefix `bin/` and `tests/` with `src/`
This is a follow-up to commit
2ea8ea1275.
2021-02-05 21:52:08 +00:00
John McLear 2dec36bfd7 lint: src/node/hooks/express/tests.js 2021-01-25 22:53:11 -05:00
webzwo0i ca405c1685 send the test files with the correct content-type header 2020-12-27 23:40:35 +00:00
Richard Hansen 8e5fd19db2 lint: Run `eslint --fix` on `src/` 2020-11-24 20:06:12 +00:00
Richard Hansen 79119baf58 hooks: Call the callback when done
If a hook function neither calls the callback nor returns a
(non-undefined) value then there's no way for the hook system to know
if/when the hook function has finished.
2020-10-24 16:08:50 +01:00
Richard Hansen 4a25559a2d tests: Aggressively filter out non-.js files
This prevents errors when the directory contains Emacs backup files.
2020-10-14 10:38:52 +01:00
John McLear e24ef6969e
Bugfix / tests: Specs list type (#4169)
* remove cruft..  ugh

* housekeeping: close stale issues

* fix issue #3945
2020-07-15 17:37:03 +01:00
Gabriel Augusto Almeida da0ea3a29d tests: avoid ERR_TOO_MANY_REDIRECTS on frontend tests under Windows
If Etherpad is hosted on Windows the frontend test URI needs to be
/tests/frontend/index.html (docs say .../frontend/), otherwise there is this
error: ERR_TOO_MANY_REDIRECTS.

Fixes #3804.
2020-04-20 01:48:23 +02:00
John McLear 4eec68fbdd tests: ignore vim swap files
This helps during plugin development, which otherwise which break when a
developer is editing a test.
2020-03-24 23:24:38 +01:00
Ray Bellis 23a3a079a6 tests.js: remove use of async.js
Use real `async` instead of async.js where applicable.
The `getPluginTests()` function was never truly async anyway because it only
contains calls to synchronous `fs` modules.
2019-01-23 16:21:40 +00:00
muxator 9497ee734f prepare to async: trivial reformatting
This change is only cosmetic. Its aim is do make it easier to understand the
async changes that are going to be merged later on. It was extracted from the
original work from Ray Bellis.

To verify that nothing has changed, you can run the following command on each
file touched by this commit:
  npm install uglify-es
  diff --unified <(uglify-js --beautify bracketize <BEFORE.js>) <(uglify-js --beautify bracketize <AFTER.js>)



This is a complete script that does the same automatically (works from a
mercurial clone):

```bash
#!/usr/bin/env bash

set -eu

REVISION=<THIS_REVISION>

PARENT_REV=$(hg identify --rev "${REVISION}" --template '{p1rev}')
FILE_LIST=$(hg status --no-status --change ${REVISION})
UGLIFYJS="node_modules/uglify-es/bin/uglifyjs"

for FILE_NAME in ${FILE_LIST[@]}; do
  echo "Checking ${FILE_NAME}"
  diff --unified \
    <("${UGLIFYJS}" --beautify bracketize <(hg cat --rev "${PARENT_REV}" "${FILE_NAME}")) \
    <("${UGLIFYJS}" --beautify bracketize <(hg cat --rev "${REVISION}"   "${FILE_NAME}"))
done
```
2019-02-08 23:20:57 +01:00
Tom Hunkapiller 2e4374c08d clearer comments about the path handling behavior 2015-04-10 20:19:26 -05:00
Tom Hunkapiller 3ebb19d8a2 fix an issue in the path handling that allowed directory traversal 2015-04-10 20:03:00 -05:00
Tom Hunkapiller de67714cf8 fix minify route path; update deprecated calls 2015-04-10 05:52:58 -05:00
John McLear da0b331502 Make async and cleaner 2013-02-04 00:00:39 +00:00
John McLear 8b8cf01785 put tests in static folder, still have a race condition no biggy 2013-02-03 13:53:44 +00:00
John McLear 0ff9f53297 correct path 2013-02-03 00:18:24 +00:00
John McLear 594d272334 allow plugins to specify frontend test specs 2013-02-03 00:14:17 +00:00
Marcel Klehr 364e6928b5 Make tests work on windows 2012-11-17 16:28:54 +01:00
Peter 'Pita' Martischka 9537892c61 wrap spec files with a describe 2012-10-27 17:29:17 +01:00
Peter 'Pita' Martischka cac27c864a load list of spec files from the server 2012-10-27 17:05:26 +01:00
Peter 'Pita' Martischka cc7ddddd2f redirect from frontend to frontend/ 2012-10-27 16:41:17 +01:00
Peter 'Pita' Martischka ca6ebd6151 major restructering of the front end test framework 2012-10-08 00:34:29 +02:00
Peter 'Pita' Martischka ba4ebbba3b Setted up an enviroment for frontend tests, first steps 2012-10-02 00:35:43 +01:00