describe("The gps library", function() describe("gps.locate", function() it("validates arguments", function() stub(_G, "commands", { getBlockPosition = function() end }) gps.locate() gps.locate(1) gps.locate(1, true) expect.error(gps.locate, ""):eq("bad argument #1 (expected number, got string)") expect.error(gps.locate, 1, ""):eq("bad argument #2 (expected boolean, got string)") end) end) end)