We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 26a4c09 commit 6a02ad3Copy full SHA for 6a02ad3
tests/instance_test.rb
@@ -36,12 +36,16 @@ def test_invalid_module
36
end
37
38
def test_basic_sum
39
- assert_equal 3, Wasmer::Instance.new(self.bytes).exports.sum(1, 2)
+ exports = Wasmer::Instance.new(self.bytes).exports
40
+ assert exports.respond_to?(:sum)
41
+ assert_equal 3, exports.sum(1, 2)
42
43
44
def test_call_unknown_function
45
46
+ assert !exports.respond_to?(:foo)
47
error = assert_raises(RuntimeError) {
- Wasmer::Instance.new(self.bytes).exports.foo
48
+ exports.foo
49
}
50
assert_equal "Function `foo` does not exist.", error.message
51
0 commit comments