You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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:
68
68
69
-
* mounting a test archive in the libzim WASM;
69
+
* mounting a test archive in each of the four libzim builds;
70
70
* checking the reported article count;
71
71
* loading an article;
72
72
* searching.
73
73
74
74
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
75
75
prototype, and are available in `/tests/prototype`.
76
76
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
78
78
if you build using the provided Makefile) and then run the following commands from the root of this Repository:
79
79
80
80
```
81
81
npm install
82
82
npm test
83
83
```
84
84
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
+
85
87
To run tests in a different browser, copy and adapt the test runner `chromium.e2e.runner.js`. Run it manually like so:
0 commit comments