示例工程 32-openresty-and-redis
32-openresty-and-redis/01-ngx-handler/_test.lua
-- @runtimes lua54
local h = require("harness")
local m = require("main")
h.describe("ngx handler", function()
h.it("stub 可测试", function()
local r = m.run(function() end)
h.eq(r.status, 200)
h.eq(r.body, "hello Ada")
end)
end)
h.run()