Testing the platform · 56 / 69
Expect a type error
YOUR TASK
Make this happen
Some type exercises succeed when invalid code is rejected. Change the valid cache call into one that passes a number instead of a string. The academy checks for the precise type.bad-argument diagnostic and never executes this snippet.
Read the cases in
lesson.test.lua, then choose Check solution to see what needs to change.Update
subject.luauntil every test passes. Keep the supplied tests unchanged.
Read the starter and tests
subject.lua
return ctx.cache.get("valid")
lesson.test.lua
-- This exercise checks for type.bad-argument without executing code.