mirror of
https://github.com/fluencelabs/wasm-bindgen
synced 2025-06-24 18:21:33 +00:00
Migrate Function
tests to wasm
This commit is contained in:
10
crates/js-sys/tests/wasm/Function.js
Normal file
10
crates/js-sys/tests/wasm/Function.js
Normal file
@ -0,0 +1,10 @@
|
||||
// Used for `Function.rs` tests
|
||||
exports.get_function_to_bind = function() {
|
||||
return function() { return this.x || 1; }
|
||||
};
|
||||
exports.get_value_to_bind_to = function() {
|
||||
return { x: 2 };
|
||||
};
|
||||
exports.call_function = function(f) {
|
||||
return f();
|
||||
};
|
Reference in New Issue
Block a user