From 02c9bce645ac207893a68963fe27e23e2813de36 Mon Sep 17 00:00:00 2001 From: Filip Tibell Date: Sun, 20 Aug 2023 20:02:01 -0500 Subject: [PATCH] Add test to ensure warn global exists and is a function --- src/tests.rs | 1 + tests/globals/warn.luau | 5 +++++ 2 files changed, 6 insertions(+) create mode 100644 tests/globals/warn.luau diff --git a/src/tests.rs b/src/tests.rs index 5380e5d..2d59658 100644 --- a/src/tests.rs +++ b/src/tests.rs @@ -84,6 +84,7 @@ create_tests! { global_pcall: "globals/pcall", global_type: "globals/type", global_typeof: "globals/typeof", + global_warn: "globals/warn", serde_compression_files: "serde/compression/files", serde_compression_roundtrip: "serde/compression/roundtrip", diff --git a/tests/globals/warn.luau b/tests/globals/warn.luau new file mode 100644 index 0000000..b561dd7 --- /dev/null +++ b/tests/globals/warn.luau @@ -0,0 +1,5 @@ +assert(warn ~= nil, "Missing 'warn' global") +assert( + type(warn) == "function", + string.format("Global 'warn' should be a function, got '%s'", tostring(type(warn))) +)