2
0
mirror of https://github.com/koreader/koreader synced 2024-11-16 06:12:56 +00:00
koreader/doc/Unit tests.md
2017-04-08 03:44:59 -07:00

705 B

Unit Tests

Unit tests are automatically performed using busted. It depends on luarocks.

To grab busted, install the same version as used in the automated tests. At the time of writing that is 2.0.rc12-1:

mkdir $HOME/.luarocks
cp /etc/luarocks/config.lua $HOME/.luarocks/config.lua
echo "wrap_bin_scripts = false" >> $HOME/.luarocks/config.lua
luarocks --local install busted 2.0.rc12-1

Then you can set up the environment variables with ./kodev activate.

If all went well, you'll now be able to run ./kodev test front (for the frontend) or ./kodev test base (for koreader-base).