Skip to content

Commit ccdf9dd

Browse files
JaifroidRishabhg71
andauthored
Update README.md with new testing info (#68)
Co-authored-by: Rishabh Gautam <[email protected]>
1 parent ead09e9 commit ccdf9dd

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

README.md

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -63,25 +63,27 @@ sudo apt install zlib1g-dev libicu-dev libxapian-dev liblzma-dev
6363

6464
## Tests
6565

66-
Basic Unit tests are run on each automated build before publishing on the WASM development versions (`libim-wasm.dev.js` and `libzim-wasm.dev.wasm`).
67-
The units tested are the same as those tested in the prototype (see above), i.e.:
66+
Basic Unit tests are run on each automated build before publishing on the ASM and WASM builds (e.g., `libim-wasm.dev.js` and `libzim-wasm.dev.wasm`).
67+
The units tested are the same as those tested in the prototype (see above) and run on two test ZIMs. The specific tests are:
6868

69-
* mounting a test archive in the libzim WASM;
69+
* mounting a test archive in each of the four libzim builds;
7070
* checking the reported article count;
7171
* loading an article;
7272
* searching.
7373

7474
Tests are run in Chromium browser context (needed in order to test WORKERFS) rather than purely in Node, so they are based on automation of the
7575
prototype, and are available in `/tests/prototype`.
7676

77-
To run tests manually, replace the two `libzim-wasm.*.*` files in `tests/prototype` with the versions you wish to test (this is done automatically
77+
To run tests manually, replace the six `libzim-[w]asm.*.*` files in `tests/prototype` with the versions you wish to test (this is done automatically
7878
if you build using the provided Makefile) and then run the following commands from the root of this Repository:
7979

8080
```
8181
npm install
8282
npm test
8383
```
8484

85+
If you want to test certain build files you can start the server via `npx http-server --port 8080` and then visit `http://127.0.0.1:8080/tests/prototype/index.html?worker=libzim-[w]asm.*.*`.
86+
8587
To run tests in a different browser, copy and adapt the test runner `chromium.e2e.runner.js`. Run it manually like so:
8688

8789
`npx start-server-and-test 'http-server --silent' 8080 'npx mocha ./tests/prototype/chromium.e2e.runner.js'`

0 commit comments

Comments
 (0)