kiwix-js
kiwix-js copied to clipboard
Add tests on libzim wasm
The libzim already has its unit tests, the goal is not duplicate them.
We might add some unit tests (maybe the same as the ones we already have on our javascript backend) But, if we're lucky, implementing #870 should allow our current UI tests to run on both backends: the javascript one on old browsers, and libzim on more recent ones
Considering that the libzim wasm version will be published within the openzim/libzim project, I wonder if such unit tests should not better be at openzim/libzim level. Or in worse case, on the wrapper itself in openzim/javascript-libzim.
I don't know yet. It's probably a bit early to decide. I suppose the libzim already has its unit tests, there's no need to duplicate them. I'd advise to wait and see where it seems the most appropriate. It might be very easy to re-use the existing unit and UI test of kiwix-js with the libzim backend
My opinion is that:
- If we test something in
openzim/libzim, we would test the the compilation works and that the output is usable... so goal is not to test libzim code, but emscriten compilation - Probably we should better and simply unit test properly the wrapper
openzim/javascript-libzim.