-
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Taken from https://github.com/koreader/koreader-base/wiki/Unit-testing with intent to delete
- Loading branch information
Showing
1 changed file
with
14 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
# Unit Tests | ||
|
||
Unit tests are automatically performed using [busted](http://olivinelabs.com/busted/). It depends on `luarocks`. | ||
|
||
To grab busted, install the same version [as used in the automated tests](https://github.com/koreader/koreader/blob/master/.ci/install.sh). At the time of writing that is 2.0.rc12-1: | ||
```bash | ||
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). |