Commit graph

16 commits

Author SHA1 Message Date
John McLear
9fb2c640b9
tests: Microsoft Windows Server CI (#4791)
Due to a recent release that wasn't functioning properly this CI will help us catch the majority of Microsoft Node Quirks before they make it into a release.
2021-02-18 18:49:43 +00:00
Richard Hansen
7dae5e3db8 tests: Use the supertest agent from common.js for backend tests 2021-02-16 21:13:35 -05:00
Richard Hansen
5a91cf1b49 tests: Disable rate limiting for backend tests 2021-02-16 21:13:35 -05:00
Richard Hansen
4ae8fbc40d tests: Increase importexportGetPost.js timeouts
The tests were timing out on my machine.
2021-02-16 21:13:35 -05:00
Richard Hansen
3d2f77f75d lint: Fix ESLint errors in backend tests 2021-02-16 21:13:35 -05:00
Richard Hansen
b711ff6acf import: Ajaxify pad import
This eliminates an inline script (good for Content Security Policy)
and improves the user experience.
2021-02-14 08:35:38 +00:00
John McLear
e585d321f9
tests: timeouts for tests (#4773) 2021-02-13 19:00:06 +00:00
Richard Hansen
71c1899164 tests: Asyncify tests in api.js 2021-02-13 08:12:53 +00:00
Richard Hansen
e0f499cf5a tests: Use the supertest agent from common.js for api.js 2021-02-13 08:12:53 +00:00
Richard Hansen
08124ba733 tests: Delete unnecessary describe() calls in api.js 2021-02-13 08:12:53 +00:00
Richard Hansen
fc9b22475a tests: Always call backend common.init() at startup
This provides a place to set the timeout for `common.init()` so that
individual tests don't have to.
2021-02-13 08:12:53 +00:00
Richard Hansen
6953e40c75 tests: Wait for common.init() to complete before returning 2021-02-13 08:12:53 +00:00
Richard Hansen
66544be354 lint: src/tests/backend/specs/api/api.js 2021-02-13 00:46:30 -05:00
Richard Hansen
8f2f6593be lint: Re-run eslint --fix 2021-02-13 00:31:36 -05:00
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
2ea8ea1275 restructure: move bin/ and tests/ to src/
Also add symlinks from the old `bin/` and `tests/` locations to avoid
breaking scripts and other tools.

Motivations:

  * Scripts and tests no longer have to do dubious things like:

        require('ep_etherpad-lite/node_modules/foo')

    to access packages installed as dependencies in
    `src/package.json`.

  * Plugins can access the backend test helper library in a non-hacky
    way:

        require('ep_etherpad-lite/tests/backend/common')

  * We can delete the top-level `package.json` without breaking our
    ability to lint the files in `bin/` and `tests/`.

    Deleting the top-level `package.json` has downsides: It will cause
    `npm` to print warnings whenever plugins are installed, npm will
    no longer be able to enforce a plugin's peer dependency on
    ep_etherpad-lite, and npm will keep deleting the
    `node_modules/ep_etherpad-lite` symlink that points to `../src`.

    But there are significant upsides to deleting the top-level
    `package.json`: It will drastically speed up plugin installation
    because `npm` doesn't have to recursively walk the dependencies in
    `src/package.json`. Also, deleting the top-level `package.json`
    avoids npm's horrible dependency hoisting behavior (where it moves
    stuff from `src/node_modules/` to the top-level `node_modules/`
    directory). Dependency hoisting causes numerous mysterious
    problems such as silent failures in `npm outdated` and `npm
    update`. Dependency hoisting also breaks plugins that do:

        require('ep_etherpad-lite/node_modules/foo')
2021-02-04 17:15:08 -05:00