mirror of
https://github.com/fluencelabs/wasm-bindgen
synced 2025-04-22 04:32:13 +00:00
wasm-bindgen-test: Use spread array arguments instead of arguments objects
Our testing runtime tries to call `Array.prototype.forEach` on this object, so it had damn well better be a proper array! Fixes #1167
This commit is contained in:
parent
666c1e4584
commit
51ef19b85f
@ -7,17 +7,17 @@
|
|||||||
<script>
|
<script>
|
||||||
const orig_console_log = console.log;
|
const orig_console_log = console.log;
|
||||||
const orig_console_error = console.error;
|
const orig_console_error = console.error;
|
||||||
console.log = function() {
|
console.log = function(...args) {
|
||||||
if (window.console_log_redirect)
|
if (window.console_log_redirect)
|
||||||
window.console_log_redirect(orig_console_log, arguments);
|
window.console_log_redirect(orig_console_log, args);
|
||||||
else
|
else
|
||||||
orig_console_log.apply(this, arguments);
|
orig_console_log.apply(this, args);
|
||||||
};
|
};
|
||||||
console.error = function() {
|
console.error = function(...args) {
|
||||||
if (window.console_error_redirect)
|
if (window.console_error_redirect)
|
||||||
window.console_error_redirect(orig_console_error, arguments);
|
window.console_error_redirect(orig_console_error, args);
|
||||||
else
|
else
|
||||||
orig_console_error.apply(this, arguments);
|
orig_console_error.apply(this, args);
|
||||||
};
|
};
|
||||||
|
|
||||||
window.__wbg_test_invoke = f => f();
|
window.__wbg_test_invoke = f => f();
|
||||||
|
Loading…
x
Reference in New Issue
Block a user