diff options
Diffstat (limited to 'support/doc/development/tests.md')
-rw-r--r-- | support/doc/development/tests.md | 15 |
1 files changed, 6 insertions, 9 deletions
diff --git a/support/doc/development/tests.md b/support/doc/development/tests.md index 1c2589c8a..2e4c6ff6a 100644 --- a/support/doc/development/tests.md +++ b/support/doc/development/tests.md | |||
@@ -8,7 +8,7 @@ Prepare PostgreSQL user so PeerTube can delete/create the test databases: | |||
8 | sudo -u postgres createuser you_username --createdb --superuser | 8 | sudo -u postgres createuser you_username --createdb --superuser |
9 | ``` | 9 | ``` |
10 | 10 | ||
11 | Prepare databases: | 11 | Prepare the databases: |
12 | 12 | ||
13 | ```bash | 13 | ```bash |
14 | npm run clean:server:test | 14 | npm run clean:server:test |
@@ -45,22 +45,19 @@ sudo apt-get install parallel libimage-exiftool-perl | |||
45 | 45 | ||
46 | ### Test | 46 | ### Test |
47 | 47 | ||
48 | To run all test suites: | 48 | To run all test suites (can be long!): |
49 | 49 | ||
50 | ```bash | 50 | ```bash |
51 | npm run test # See scripts/test.sh to run a particular suite | 51 | npm run test # See scripts/test.sh to run a particular suite |
52 | ``` | 52 | ``` |
53 | 53 | ||
54 | Most of tests can be run using: | 54 | To run a specific test: |
55 | 55 | ||
56 | ```bash | 56 | ```bash |
57 | TS_NODE_TRANSPILE_ONLY=true npm run mocha -- --timeout 30000 --exit -r ts-node/register -r tsconfig-paths/register --bail server/tests/api/videos/video-transcoder.ts | 57 | npm run mocha -- --exit --bail packages/tests/src/your-test.ts |
58 | ``` | ||
59 | |||
60 | `server/tests/api/activitypub` tests will need different options: | ||
61 | 58 | ||
62 | ``` | 59 | # For example |
63 | TS_NODE_FILES=true mocha -- --timeout 30000 --exit -r ts-node/register -r tsconfig-paths/register --bail server/tests/api/activitypub/security.ts | 60 | npm run mocha -- --exit --bail packages/tests/src/api/videos/single-server.ts |
64 | ``` | 61 | ``` |
65 | 62 | ||
66 | ### Configuration | 63 | ### Configuration |