mirror of
https://github.com/lune-org/lune.git
synced 2024-12-12 13:00:37 +00:00
Expand typeof global test suite
This commit is contained in:
parent
414d8ff8f3
commit
462e9a4f5a
1 changed files with 13 additions and 0 deletions
|
@ -1,3 +1,6 @@
|
||||||
|
-- NOTE: luau-lsp warns without this for the roblox types below
|
||||||
|
--!nolint UnknownType
|
||||||
|
|
||||||
local task = require("@lune/task")
|
local task = require("@lune/task")
|
||||||
|
|
||||||
local function f() end
|
local function f() end
|
||||||
|
@ -14,3 +17,13 @@ assert(
|
||||||
assert(typeof(thread2) == "thread", "Calling typeof() did not return 'thread' after task.spawn")
|
assert(typeof(thread2) == "thread", "Calling typeof() did not return 'thread' after task.spawn")
|
||||||
assert(typeof(thread3) == "thread", "Calling typeof() did not return 'thread' after task.defer")
|
assert(typeof(thread3) == "thread", "Calling typeof() did not return 'thread' after task.defer")
|
||||||
assert(typeof(thread4) == "thread", "Calling typeof() did not return 'thread' after delay")
|
assert(typeof(thread4) == "thread", "Calling typeof() did not return 'thread' after delay")
|
||||||
|
|
||||||
|
local roblox = require("@lune/roblox")
|
||||||
|
|
||||||
|
local rbx1 = roblox.Instance.new("Part")
|
||||||
|
local rbx2 = (roblox :: any).Vector3.zero
|
||||||
|
local rbx3 = (roblox :: any).Enum.KeyCode.A
|
||||||
|
|
||||||
|
assert(typeof(rbx1) == "Instance", "Calling typeof() did not return 'Instance' for Instance.new")
|
||||||
|
assert(typeof(rbx2) == "Vector3", "Calling typeof() did not return 'Vector3' for Vector3.zero")
|
||||||
|
assert(typeof(rbx3) == "EnumItem", "Calling typeof() did not return 'EnumItem' for Enum.KeyCode.A")
|
||||||
|
|
Loading…
Reference in a new issue