diff --git a/tests/discord.cm b/tests/discord.cm index 5b9ec3c..ebdae16 100644 --- a/tests/discord.cm +++ b/tests/discord.cm @@ -10,15 +10,15 @@ def TEST_APP_ID = "1446585686789586975" return { // Test that the module loads correctly test_module_loads: function() { - if (typeof discord != 'object') throw "Discord module should be an object" - if (typeof discord.init != 'function') throw "discord.init should be a function" - if (typeof discord.run_callbacks != 'function') throw "discord.run_callbacks should be a function" - if (typeof discord.shutdown != 'function') throw "discord.shutdown should be a function" + if (!is_object(discord)) throw "Discord module should be an object" + if (!is_function(discord.init)) throw "discord.init should be a function" + if (!is_function(discord.run_callbacks)) throw "discord.run_callbacks should be a function" + if (!is_function(discord.shutdown)) throw "discord.shutdown should be a function" }, // Test initialization test_init: function() { - var result = discord.init(TEST_APP_ID) + var result = discord.init(TEST_APP_ID) if (!result) throw "discord.init should return true on success" },