mirror of https://github.com/koreader/koreader
You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
24 lines
861 B
Lua
24 lines
861 B
Lua
describe("document registry module", function()
|
|
local DocumentRegistry
|
|
|
|
setup(function()
|
|
require("commonrequire")
|
|
DocumentRegistry = require("document/documentregistry")
|
|
end)
|
|
|
|
it("should get preferred rendering engine", function()
|
|
assert.is_equal("Cool Reader Engine",
|
|
DocumentRegistry:getProvider("bla.epub").provider_name)
|
|
assert.is_equal("MuPDF",
|
|
DocumentRegistry:getProvider("bla.pdf").provider_name)
|
|
end)
|
|
|
|
it("should return all supported rendering engines", function()
|
|
local providers = DocumentRegistry:getProviders("bla.epub")
|
|
assert.is_equal("Cool Reader Engine",
|
|
providers[1].provider.provider_name)
|
|
assert.is_equal("MuPDF",
|
|
providers[2].provider.provider_name)
|
|
end)
|
|
end)
|