mirror of
https://github.com/koreader/koreader.git
synced 2025-08-10 00:52:38 +00:00
fix broken unit tests on Travis CI
1. It turns out that `device_id` is not defined in unit test environment which makes the `assert(self.kosync_device_id)` fail and somehow makes `luajit` segmentation fault. 2. In the device spec, stubbing `io.open` will make subsquent `require` all return boolean value and segmentation fault `luajit`. This patch is a minimum viable change that makes CI work on both my local box and Travis.
This commit is contained in:
@@ -156,6 +156,9 @@ describe("Readerrolling module", function()
|
||||
end)
|
||||
|
||||
describe("switching screen mode should not change current page number", function()
|
||||
teardown(function()
|
||||
readerui:handleEvent(Event:new("ChangeScreenMode", "portrait"))
|
||||
end)
|
||||
it("for portrait-landscape-portrait switching", function()
|
||||
for i = 80, 100, 10 do
|
||||
readerui:handleEvent(Event:new("ChangeScreenMode", "portrait"))
|
||||
|
||||
Reference in New Issue
Block a user