tests: speedup document tests

This commit is contained in:
Benoit Pierre
2024-12-25 15:46:03 +01:00
committed by Frans de Jonge
parent 646ed9a07f
commit e0562f72e5

View File

@@ -55,15 +55,14 @@ describe("EPUB document module", function()
local doc local doc
it("should open document", function() it("should open document", function()
local sample_epub = "spec/front/unit/data/leaves.epub" doc = DocumentRegistry:openDocument("spec/front/unit/data/juliet.epub")
doc = DocumentRegistry:openDocument(sample_epub)
assert.truthy(doc) assert.truthy(doc)
end) end)
it("should get cover image", function() it("should get cover image", function()
local image = doc:getCoverPageImage() local image = doc:getCoverPageImage()
assert.truthy(image) assert.truthy(image)
assert.are.same(image:getWidth(), 442) assert.are.same(520, image:getWidth())
assert.are.same(image:getHeight(), 616) assert.are.same(800, image:getHeight())
end) end)
it("should register droid sans fallback", function() it("should register droid sans fallback", function()
local face_list = cre.getFontFaces() local face_list = cre.getFontFaces()