tests - add test for overriding base env with false

This commit is contained in:
Enrique García Cota 2021-01-07 18:32:29 +01:00
parent 26553beec7
commit 3f11f19ba3
No known key found for this signature in database
GPG Key ID: 3BAA19133AAD7764

View File

@ -135,6 +135,11 @@ describe('sandbox.run', function()
local env = { tostring = function(x) return "hello " .. x end }
assert.equal("hello peter", sandbox.run("return tostring('peter')", { env = env }))
end)
it('can override the base env with false', function()
local env = { tostring = false }
assert.equal(false, sandbox.run("return tostring", { env = env }))
end)
end)
end)