Commit graph

15 commits

Author SHA1 Message Date
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