kiwix-js icon indicating copy to clipboard operation
kiwix-js copied to clipboard

Add tests on libzim wasm

Open mossroy opened this issue 3 years ago • 3 comments

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

mossroy avatar Jun 06 '22 14:06 mossroy

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.

kelson42 avatar Nov 13 '22 15:11 kelson42

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

mossroy avatar Nov 13 '22 18:11 mossroy

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.

kelson42 avatar Nov 13 '22 18:11 kelson42