awesomewm.d.tl/spec/scraper/module_doc_spec.tl

23 lines
599 B
Plaintext
Raw Normal View History

2023-05-04 00:45:39 +02:00
local assert = require("luassert")
local scraper = require("scraper").module_doc
local get_doc_from_page = scraper.get_doc_from_page
describe("Scrap documentation", function()
it("should return a valid AST for an empty module", function()
local ast <const>, nodes <const> = get_doc_from_page("", "empty")
assert.same(ast, {
children = {
{
children = {},
name = "Signal",
token = "enum",
}
},
name = "Empty",
token = "module",
})
assert.same(nodes, {})
end)
end)