Skip to content

Allow suppression of stack trace in test output #1621

Open
@EverlastingBugstopper

Description

@EverlastingBugstopper

Motivation

When running wasm-pack test (which I believe uses wasm-bindgen under the hood) and a test fails, a very large and noisy stack trace is printed. This buries the actual test failure.

Proposed Solution

Suppress stack traces associated with panics resulting from asserts

Alternatives

Perhaps a flag could be passed along with wasm-pack test to perform this suppression if for some reason the existing pattern is desired as the default case, but I don't think people need all of the stack info when a simple assert fails.

Additional Context

Current output for a single failed assert:

$ wasm-pack test --firefox --headless
[INFO]: 🎯  Checking for the Wasm target...
   Compiling wasm-game-of-life v0.1.0 (/Users/averyharnish/Documents/dev/wasm-game-of-life)
    Finished dev [unoptimized + debuginfo] target(s) in 0.75s
[INFO]: ⬇️  Installing wasm-bindgen...
    Finished dev [unoptimized + debuginfo] target(s) in 0.08s
     Running target/wasm32-unknown-unknown/debug/deps/wasm_game_of_life-6cac8c81dcbc995f.wasm
no tests to run!
     Running target/wasm32-unknown-unknown/debug/deps/web-8d69fc5e17f25641.wasm
Running headless tests in Firefox with `/Users/averyharnish/Library/Caches/.wasm-pack/geckodriver-f414c4e9bd3c18ab/geckodriver`
running 1 test                                    

test web::pass ... FAIL

failures:

---- web::pass output ----
    error output:
        panicked at 'assertion failed: `(left == right)`
          left: `2`,
         right: `3`', tests/web.rs:12:5
        
        Stack:
        
        init/imports.wbg.__wbg_new_59cb74e423758ede@http://127.0.0.1:54931/wasm-bindgen-test:749:34
        console_error_panic_hook::Error::new::h215cea98fae478eb@http://127.0.0.1:54931/wasm-bindgen-test_bg.wasm:wasm-function[982]:0x6d2d2
        console_error_panic_hook::hook_impl::h305836b7eb956b95@http://127.0.0.1:54931/wasm-bindgen-test_bg.wasm:wasm-function[303]:0x49469
        console_error_panic_hook::hook::h547564e70f456f1a@http://127.0.0.1:54931/wasm-bindgen-test_bg.wasm:wasm-function[1850]:0x7fdab
        core::ops::function::Fn::call::h2e061d86641238fe@http://127.0.0.1:54931/wasm-bindgen-test_bg.wasm:wasm-function[1700]:0x7d9e4
        std::panicking::rust_panic_with_hook::h12b7239ed4348eae@http://127.0.0.1:54931/wasm-bindgen-test_bg.wasm:wasm-function[461]:0x56007
        std::panicking::continue_panic_fmt::hfbe042bfacb6a5d7@http://127.0.0.1:54931/wasm-bindgen-test_bg.wasm:wasm-function[1126]:0x71485
        std::panicking::begin_panic_fmt::hb49e9d7f7ff6a73d@http://127.0.0.1:54931/wasm-bindgen-test_bg.wasm:wasm-function[1388]:0x77b39
        web::pass::h92d10aba48feb4c2@http://127.0.0.1:54931/wasm-bindgen-test_bg.wasm:wasm-function[203]:0x3e361
        core::ops::function::FnOnce::call_once::h2f20b772a1bfdb76@http://127.0.0.1:54931/wasm-bindgen-test_bg.wasm:wasm-function[2005]:0x81dca
        wasm_bindgen_test::__rt::Context::execute_sync::{{closure}}::h5422fac73fbb2e6d@http://127.0.0.1:54931/wasm-bindgen-test_bg.wasm:wasm-function[1475]:0x798dd
        futures::future::lazy::Lazy<F,R>::get::h997dbfaf5c84f641@http://127.0.0.1:54931/wasm-bindgen-test_bg.wasm:wasm-function[118]:0x30d59
        <futures::future::lazy::Lazy<F,R> as futures::future::Future>::poll::h2c00d9abb90774aa@http://127.0.0.1:54931/wasm-bindgen-test_bg.wasm:wasm-function[1690]:0x7d725
        <wasm_bindgen_test::__rt::TestFuture<F> as futures::future::Future>::poll::{{closure}}::{{closure}}::ha6e902e354cee437@http://127.0.0.1:54931/wasm-bindgen-test_bg.wasm:wasm-function[642]:0x60569
        wasm_bindgen::convert::closures::invoke0_mut::hec777b0463428144@http://127.0.0.1:54931/wasm-bindgen-test_bg.wasm:wasm-function[571]:0x5ca32
        cbarg0@http://127.0.0.1:54931/wasm-bindgen-test:360:29
        window.__wbg_test_invoke@http://127.0.0.1:54931/:37:38
        init/imports.wbg.__wbg_wbgtestinvoke_5dce6d327a8e02a5@http://127.0.0.1:54931/wasm-bindgen-test:373:17
        wasm_bindgen_test::__rt::__wbg_test_invoke::h078ba9ce92609948@http://127.0.0.1:54931/wasm-bindgen-test_bg.wasm:wasm-function[226]:0x40fca
        <wasm_bindgen_test::__rt::TestFuture<F> as futures::future::Future>::poll::{{closure}}::hf0037658e1a26b7b@http://127.0.0.1:54931/wasm-bindgen-test_bg.wasm:wasm-function[781]:0x666fb
        scoped_tls::ScopedKey<T>::set::he3f26e02304d62ec@http://127.0.0.1:54931/wasm-bindgen-test_bg.wasm:wasm-function[557]:0x5bddd
        <wasm_bindgen_test::__rt::TestFuture<F> as futures::future::Future>::poll::hde87631935f6b195@http://127.0.0.1:54931/wasm-bindgen-test_bg.wasm:wasm-function[210]:0x3f063
        <alloc::boxed::Box<F> as futures::future::Future>::poll::hb8f8d2ed9a2281af@http://127.0.0.1:54931/wasm-bindgen-test_bg.wasm:wasm-function[1464]:0x79572
        <wasm_bindgen_test::__rt::ExecuteTests as futures::future::Future>::poll::h7660a0eeab9e03ea@http://127.0.0.1:54931/wasm-bindgen-test_bg.wasm:wasm-function[39]:0x135eb
        <futures::future::map::Map<A,F> as futures::future::Future>::poll::h6f1e857129c1f265@http://127.0.0.1:54931/wasm-bindgen-test_bg.wasm:wasm-function[128]:0x328f7
        <futures::future::map_err::MapErr<A,F> as futures::future::Future>::poll::hdf4e61681dee17fc@http://127.0.0.1:54931/wasm-bindgen-test_bg.wasm:wasm-function[331]:0x4be0c
        <alloc::boxed::Box<F> as futures::future::Future>::poll::h3966e35a79543be2@http://127.0.0.1:54931/wasm-bindgen-test_bg.wasm:wasm-function[1465]:0x795c6
        futures::task_impl::Spawn<T>::poll_future_notify::{{closure}}::h1f509e1906d9c72d@http://127.0.0.1:54931/wasm-bindgen-test_bg.wasm:wasm-function[1744]:0x7e4d0
        futures::task_impl::Spawn<T>::enter::{{closure}}::h3388f26f45c29944@http://127.0.0.1:54931/wasm-bindgen-test_bg.wasm:wasm-function[1483]:0x79b8d
        futures::task_impl::std::set::h7f5d59173f9211e5@http://127.0.0.1:54931/wasm-bindgen-test_bg.wasm:wasm-function[561]:0x5c185
        futures::task_impl::Spawn<T>::enter::h3dbeddd8a916880d@http://127.0.0.1:54931/wasm-bindgen-test_bg.wasm:wasm-function[356]:0x4e0ef
        futures::task_impl::Spawn<T>::poll_fn_notify::hef26c43922ead4b8@http://127.0.0.1:54931/wasm-bindgen-test_bg.wasm:wasm-function[719]:0x63edf
        futures::task_impl::Spawn<T>::poll_future_notify::ha18e29bdf18b961f@http://127.0.0.1:54931/wasm-bindgen-test_bg.wasm:wasm-function[1365]:0x772f6
        wasm_bindgen_futures::_future_to_promise::Package::poll::h0fdeeded39c304e3@http://127.0.0.1:54931/wasm-bindgen-test_bg.wasm:wasm-function[86]:0x293e9
        wasm_bindgen_futures::_future_to_promise::{{closure}}::hebcbb84111326582@http://127.0.0.1:54931/wasm-bindgen-test_bg.wasm:wasm-function[231]:0x41a58
        wasm_bindgen::convert::closures::invoke2_mut::h8e49989bdb30f6b5@http://127.0.0.1:54931/wasm-bindgen-test_bg.wasm:wasm-function[319]:0x4ad69
        cbarg0@http://127.0.0.1:54931/wasm-bindgen-test:667:29
        init/imports.wbg.__wbg_new_9a63f36b37c30713@http://127.0.0.1:54931/wasm-bindgen-test:680:38
        js_sys::Promise::new::h41e6514d360da675@http://127.0.0.1:54931/wasm-bindgen-test_bg.wasm:wasm-function[550]:0x5b769
        wasm_bindgen_futures::_future_to_promise::h3c1148a48563c8fe@http://127.0.0.1:54931/wasm-bindgen-test_bg.wasm:wasm-function[406]:0x5217f
        wasm_bindgen_futures::future_to_promise::he7018594b96adac0@http://127.0.0.1:54931/wasm-bindgen-test_bg.wasm:wasm-function[717]:0x63d7f
        wasm_bindgen_test::__rt::Context::run::hc7160faecf6d3d61@http://127.0.0.1:54931/wasm-bindgen-test_bg.wasm:wasm-function[61]:0x20975
        wasmbindgentestcontext_run@http://127.0.0.1:54931/wasm-bindgen-test_bg.wasm:wasm-function[281]:0x471ff
        run@http://127.0.0.1:54931/wasm-bindgen-test:292:32
        main@http://127.0.0.1:54931/run.js:33:22
        
        
        
    
    JS exception that was thrown:
        RuntimeError: unreachable executed
        __rust_start_panic@http://127.0.0.1:54931/wasm-bindgen-test_bg.wasm:wasm-function[2176]:0x83912
        rust_panic@http://127.0.0.1:54931/wasm-bindgen-test_bg.wasm:wasm-function[2109]:0x82f58
        std::panicking::rust_panic_with_hook::h12b7239ed4348eae@http://127.0.0.1:54931/wasm-bindgen-test_bg.wasm:wasm-function[461]:0x5602e
        std::panicking::continue_panic_fmt::hfbe042bfacb6a5d7@http://127.0.0.1:54931/wasm-bindgen-test_bg.wasm:wasm-function[1126]:0x71485
        std::panicking::begin_panic_fmt::hb49e9d7f7ff6a73d@http://127.0.0.1:54931/wasm-bindgen-test_bg.wasm:wasm-function[1388]:0x77b39
        web::pass::h92d10aba48feb4c2@http://127.0.0.1:54931/wasm-bindgen-test_bg.wasm:wasm-function[203]:0x3e361
        core::ops::function::FnOnce::call_once::h2f20b772a1bfdb76@http://127.0.0.1:54931/wasm-bindgen-test_bg.wasm:wasm-function[2005]:0x81dca
        wasm_bindgen_test::__rt::Context::execute_sync::{{closure}}::h5422fac73fbb2e6d@http://127.0.0.1:54931/wasm-bindgen-test_bg.wasm:wasm-function[1475]:0x798dd
        futures::future::lazy::Lazy<F,R>::get::h997dbfaf5c84f641@http://127.0.0.1:54931/wasm-bindgen-test_bg.wasm:wasm-function[118]:0x30d59
        <futures::future::lazy::Lazy<F,R> as futures::future::Future>::poll::h2c00d9abb90774aa@http://127.0.0.1:54931/wasm-bindgen-test_bg.wasm:wasm-function[1690]:0x7d725
        <wasm_bindgen_test::__rt::TestFuture<F> as futures::future::Future>::poll::{{closure}}::{{closure}}::ha6e902e354cee437@http://127.0.0.1:54931/wasm-bindgen-test_bg.wasm:wasm-function[642]:0x60569
        wasm_bindgen::convert::closures::invoke0_mut::hec777b0463428144@http://127.0.0.1:54931/wasm-bindgen-test_bg.wasm:wasm-function[571]:0x5ca32
        cbarg0@http://127.0.0.1:54931/wasm-bindgen-test:360:29
        window.__wbg_test_invoke@http://127.0.0.1:54931/:37:38
        init/imports.wbg.__wbg_wbgtestinvoke_5dce6d327a8e02a5@http://127.0.0.1:54931/wasm-bindgen-test:373:17
        wasm_bindgen_test::__rt::__wbg_test_invoke::h078ba9ce92609948@http://127.0.0.1:54931/wasm-bindgen-test_bg.wasm:wasm-function[226]:0x40fca
        <wasm_bindgen_test::__rt::TestFuture<F> as futures::future::Future>::poll::{{closure}}::hf0037658e1a26b7b@http://127.0.0.1:54931/wasm-bindgen-test_bg.wasm:wasm-function[781]:0x666fb
        scoped_tls::ScopedKey<T>::set::he3f26e02304d62ec@http://127.0.0.1:54931/wasm-bindgen-test_bg.wasm:wasm-function[557]:0x5bddd
        <wasm_bindgen_test::__rt::TestFuture<F> as futures::future::Future>::poll::hde87631935f6b195@http://127.0.0.1:54931/wasm-bindgen-test_bg.wasm:wasm-function[210]:0x3f063
        <alloc::boxed::Box<F> as futures::future::Future>::poll::hb8f8d2ed9a2281af@http://127.0.0.1:54931/wasm-bindgen-test_bg.wasm:wasm-function[1464]:0x79572
        <wasm_bindgen_test::__rt::ExecuteTests as futures::future::Future>::poll::h7660a0eeab9e03ea@http://127.0.0.1:54931/wasm-bindgen-test_bg.wasm:wasm-function[39]:0x135eb
        <futures::future::map::Map<A,F> as futures::future::Future>::poll::h6f1e857129c1f265@http://127.0.0.1:54931/wasm-bindgen-test_bg.wasm:wasm-function[128]:0x328f7
        <futures::future::map_err::MapErr<A,F> as futures::future::Future>::poll::hdf4e61681dee17fc@http://127.0.0.1:54931/wasm-bindgen-test_bg.wasm:wasm-function[331]:0x4be0c
        <alloc::boxed::Box<F> as futures::future::Future>::poll::h3966e35a79543be2@http://127.0.0.1:54931/wasm-bindgen-test_bg.wasm:wasm-function[1465]:0x795c6
        futures::task_impl::Spawn<T>::poll_future_notify::{{closure}}::h1f509e1906d9c72d@http://127.0.0.1:54931/wasm-bindgen-test_bg.wasm:wasm-function[1744]:0x7e4d0
        futures::task_impl::Spawn<T>::enter::{{closure}}::h3388f26f45c29944@http://127.0.0.1:54931/wasm-bindgen-test_bg.wasm:wasm-function[1483]:0x79b8d
        futures::task_impl::std::set::h7f5d59173f9211e5@http://127.0.0.1:54931/wasm-bindgen-test_bg.wasm:wasm-function[561]:0x5c185
        futures::task_impl::Spawn<T>::enter::h3dbeddd8a916880d@http://127.0.0.1:54931/wasm-bindgen-test_bg.wasm:wasm-function[356]:0x4e0ef
        futures::task_impl::Spawn<T>::poll_fn_notify::hef26c43922ead4b8@http://127.0.0.1:54931/wasm-bindgen-test_bg.wasm:wasm-function[719]:0x63edf
        futures::task_impl::Spawn<T>::poll_future_notify::ha18e29bdf18b961f@http://127.0.0.1:54931/wasm-bindgen-test_bg.wasm:wasm-function[1365]:0x772f6
        wasm_bindgen_futures::_future_to_promise::Package::poll::h0fdeeded39c304e3@http://127.0.0.1:54931/wasm-bindgen-test_bg.wasm:wasm-function[86]:0x293e9
        wasm_bindgen_futures::_future_to_promise::{{closure}}::hebcbb84111326582@http://127.0.0.1:54931/wasm-bindgen-test_bg.wasm:wasm-function[231]:0x41a58
        wasm_bindgen::convert::closures::invoke2_mut::h8e49989bdb30f6b5@http://127.0.0.1:54931/wasm-bindgen-test_bg.wasm:wasm-function[319]:0x4ad69
        cbarg0@http://127.0.0.1:54931/wasm-bindgen-test:667:29
        init/imports.wbg.__wbg_new_9a63f36b37c30713@http://127.0.0.1:54931/wasm-bindgen-test:680:38
        js_sys::Promise::new::h41e6514d360da675@http://127.0.0.1:54931/wasm-bindgen-test_bg.wasm:wasm-function[550]:0x5b769
        wasm_bindgen_futures::_future_to_promise::h3c1148a48563c8fe@http://127.0.0.1:54931/wasm-bindgen-test_bg.wasm:wasm-function[406]:0x5217f
        wasm_bindgen_futures::future_to_promise::he7018594b96adac0@http://127.0.0.1:54931/wasm-bindgen-test_bg.wasm:wasm-function[717]:0x63d7f
        wasm_bindgen_test::__rt::Context::run::hc7160faecf6d3d61@http://127.0.0.1:54931/wasm-bindgen-test_bg.wasm:wasm-function[61]:0x20975
        wasmbindgentestcontext_run@http://127.0.0.1:54931/wasm-bindgen-test_bg.wasm:wasm-function[281]:0x471ff
        run@http://127.0.0.1:54931/wasm-bindgen-test:292:32
        main@http://127.0.0.1:54931/run.js:33:22

failures:

    web::pass

test result: FAILED. 0 passed; 1 failed; 0 ignored
console.log div contained:test web::pass ... FAIL

failures:

---- web::pass output ----
    error output:
        panicked at 'assertion failed: `(left == right)`
          left: `2`,
         right: `3`', tests/web.rs:12:5   panicked at 'assertion failed: `(left == right)`
      left: `2`,
     right: `3`', tests/web.rs:12:5
    
    Stack:
    
    init/imports.wbg.__wbg_new_59cb74e423758ede@http://127.0.0.1:54931/wasm-bindgen-test:749:34
    console_error_panic_hook::Error::new::h215cea98fae478eb@http://127.0.0.1:54931/wasm-bindgen-test_bg.wasm:wasm-function[982]:0x6d2d2
    console_error_panic_hook::hook_impl::h305836b7eb956b95@http://127.0.0.1:54931/wasm-bindgen-test_bg.wasm:wasm-function[303]:0x49469
    console_error_panic_hook::hook::h547564e70f456f1a@http://127.0.0.1:54931/wasm-bindgen-test_bg.wasm:wasm-function[1850]:0x7fdab
    core::ops::function::Fn::call::h2e061d86641238fe@http://127.0.0.1:54931/wasm-bindgen-test_bg.wasm:wasm-function[1700]:0x7d9e4
    std::panicking::rust_panic_with_hook::h12b7239ed4348eae@http://127.0.0.1:54931/wasm-bindgen-test_bg.wasm:wasm-function[461]:0x56007
    std::panicking::continue_panic_fmt::hfbe042bfacb6a5d7@http://127.0.0.1:54931/wasm-bindgen-test_bg.wasm:wasm-function[1126]:0x71485
    std::panicking::begin_panic_fmt::hb49e9d7f7ff6a73d@http://127.0.0.1:54931/wasm-bindgen-test_bg.wasm:wasm-function[1388]:0x77b39
    web::pass::h92d10aba48feb4c2@http://127.0.0.1:54931/wasm-bindgen-test_bg.wasm:wasm-function[203]:0x3e361
    core::ops::function::FnOnce::call_once::h2f20b772a1bfdb76@http://127.0.0.1:54931/wasm-bindgen-test_bg.wasm:wasm-function[2005]:0x81dca
    wasm_bindgen_test::__rt::Context::execute_sync::{{closure}}::h5422fac73fbb2e6d@http://127.0.0.1:54931/wasm-bindgen-test_bg.wasm:wasm-function[1475]:0x798dd
    futures::future::lazy::Lazy<F,R>::get::h997dbfaf5c84f641@http://127.0.0.1:54931/wasm-bindgen-test_bg.wasm:wasm-function[118]:0x30d59
    <futures::future::lazy::Lazy<F,R> as futures::future::Future>::poll::h2c00d9abb90774aa@http://127.0.0.1:54931/wasm-bindgen-test_bg.wasm:wasm-function[1690]:0x7d725
    <wasm_bindgen_test::__rt::TestFuture<F> as futures::future::Future>::poll::{{closure}}::{{closure}}::ha6e902e354cee437@http://127.0.0.1:54931/wasm-bindgen-test_bg.wasm:wasm-function[642]:0x60569
    wasm_bindgen::convert::closures::invoke0_mut::hec777b0463428144@http://127.0.0.1:54931/wasm-bindgen-test_bg.wasm:wasm-function[571]:0x5ca32
    cbarg0@http://127.0.0.1:54931/wasm-bindgen-test:360:29
    window.__wbg_test_invoke@http://127.0.0.1:54931/:37:38
    init/imports.wbg.__wbg_wbgtestinvoke_5dce6d327a8e02a5@http://127.0.0.1:54931/wasm-bindgen-test:373:17
    wasm_bindgen_test::__rt::__wbg_test_invoke::h078ba9ce92609948@http://127.0.0.1:54931/wasm-bindgen-test_bg.wasm:wasm-function[226]:0x40fca
    <wasm_bindgen_test::__rt::TestFuture<F> as futures::future::Future>::poll::{{closure}}::hf0037658e1a26b7b@http://127.0.0.1:54931/wasm-bindgen-test_bg.wasm:wasm-function[781]:0x666fb
    scoped_tls::ScopedKey<T>::set::he3f26e02304d62ec@http://127.0.0.1:54931/wasm-bindgen-test_bg.wasm:wasm-function[557]:0x5bddd
    <wasm_bindgen_test::__rt::TestFuture<F> as futures::future::Future>::poll::hde87631935f6b195@http://127.0.0.1:54931/wasm-bindgen-test_bg.wasm:wasm-function[210]:0x3f063
    <alloc::boxed::Box<F> as futures::future::Future>::poll::hb8f8d2ed9a2281af@http://127.0.0.1:54931/wasm-bindgen-test_bg.wasm:wasm-function[1464]:0x79572
    <wasm_bindgen_test::__rt::ExecuteTests as futures::future::Future>::poll::h7660a0eeab9e03ea@http://127.0.0.1:54931/wasm-bindgen-test_bg.wasm:wasm-function[39]:0x135eb
    <futures::future::map::Map<A,F> as futures::future::Future>::poll::h6f1e857129c1f265@http://127.0.0.1:54931/wasm-bindgen-test_bg.wasm:wasm-function[128]:0x328f7
    <futures::future::map_err::MapErr<A,F> as futures::future::Future>::poll::hdf4e61681dee17fc@http://127.0.0.1:54931/wasm-bindgen-test_bg.wasm:wasm-function[331]:0x4be0c
    <alloc::boxed::Box<F> as futures::future::Future>::poll::h3966e35a79543be2@http://127.0.0.1:54931/wasm-bindgen-test_bg.wasm:wasm-function[1465]:0x795c6
    futures::task_impl::Spawn<T>::poll_future_notify::{{closure}}::h1f509e1906d9c72d@http://127.0.0.1:54931/wasm-bindgen-test_bg.wasm:wasm-function[1744]:0x7e4d0
    futures::task_impl::Spawn<T>::enter::{{closure}}::h3388f26f45c29944@http://127.0.0.1:54931/wasm-bindgen-test_bg.wasm:wasm-function[1483]:0x79b8d
    futures::task_impl::std::set::h7f5d59173f9211e5@http://127.0.0.1:54931/wasm-bindgen-test_bg.wasm:wasm-function[561]:0x5c185
    futures::task_impl::Spawn<T>::enter::h3dbeddd8a916880d@http://127.0.0.1:54931/wasm-bindgen-test_bg.wasm:wasm-function[356]:0x4e0ef
    futures::task_impl::Spawn<T>::poll_fn_notify::hef26c43922ead4b8@http://127.0.0.1:54931/wasm-bindgen-test_bg.wasm:wasm-function[719]:0x63edf
    futures::task_impl::Spawn<T>::poll_future_notify::ha18e29bdf18b961f@http://127.0.0.1:54931/wasm-bindgen-test_bg.wasm:wasm-function[1365]:0x772f6
    wasm_bindgen_futures::_future_to_promise::Package::poll::h0fdeeded39c304e3@http://127.0.0.1:54931/wasm-bindgen-test_bg.wasm:wasm-function[86]:0x293e9
    wasm_bindgen_futures::_future_to_promise::{{closure}}::hebcbb84111326582@http://127.0.0.1:54931/wasm-bindgen-test_bg.wasm:wasm-function[231]:0x41a58
    wasm_bindgen::convert::closures::invoke2_mut::h8e49989bdb30f6b5@http://127.0.0.1:54931/wasm-bindgen-test_bg.wasm:wasm-function[319]:0x4ad69
    cbarg0@http://127.0.0.1:54931/wasm-bindgen-test:667:29
    init/imports.wbg.__wbg_new_9a63f36b37c30713@http://127.0.0.1:54931/wasm-bindgen-test:680:38
    js_sys::Promise::new::h41e6514d360da675@http://127.0.0.1:54931/wasm-bindgen-test_bg.wasm:wasm-function[550]:0x5b769
    wasm_bindgen_futures::_future_to_promise::h3c1148a48563c8fe@http://127.0.0.1:54931/wasm-bindgen-test_bg.wasm:wasm-function[406]:0x5217f
    wasm_bindgen_futures::future_to_promise::he7018594b96adac0@http://127.0.0.1:54931/wasm-bindgen-test_bg.wasm:wasm-function[717]:0x63d7f
    wasm_bindgen_test::__rt::Context::run::hc7160faecf6d3d61@http://127.0.0.1:54931/wasm-bindgen-test_bg.wasm:wasm-function[61]:0x20975
    wasmbindgentestcontext_run@http://127.0.0.1:54931/wasm-bindgen-test_bg.wasm:wasm-function[281]:0x471ff
    run@http://127.0.0.1:54931/wasm-bindgen-test:292:32
    main@http://127.0.0.1:54931/run.js:33:22

error: some tests failed                          
error: test failed, to rerun pass '--test web'
Error: Running Wasm tests with wasm-bindgen-test failed
Caused by: failed to execute `cargo test`: exited with exit code: 1

I think it would be much better if instead it printed something like this:

wasm-pack test --firefox --headless
[INFO]: 🎯  Checking for the Wasm target...
    Finished dev [unoptimized + debuginfo] target(s) in 0.55s
[INFO]: ⬇️  Installing wasm-bindgen...
    Finished dev [unoptimized + debuginfo] target(s) in 0.08s
     Running target/wasm32-unknown-unknown/debug/deps/wasm_game_of_life-6cac8c81dcbc995f.wasm
no tests to run!
     Running target/wasm32-unknown-unknown/debug/deps/web-8d69fc5e17f25641.wasm
Running headless tests in Firefox with `/Users/averyharnish/Library/Caches/.wasm-pack/geckodriver-f414c4e9bd3c18ab/geckodriver`
running 1 test                                    

test web::pass ... FAIL

failures:

---- web::pass output ----
    error output:
        panicked at 'assertion failed: `(left == right)`
          left: `2`,
         right: `3`', tests/web.rs:12:5

test result: ok. 0 passed; 1 failed; 0 ignored

Metadata

Metadata

Assignees

No one assigned

    Labels

    help wantedWe could use some help fixing this issue!wasm-bindgen-testThe wasm-bindgen-test crate

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions