Skip to content

Macro, like tokio::test? #7

Description

@phated

This project is 🔥!

I've done some experiments with wasm-mt-test and it's working great. However, I need to adjust my test code to run in a worker thread. It would be super cool if I could include a macro, like use wasm_mt_test::test and then my tests would automatically run in a worker.

Unless I'm mistaken, I believe it'd just generate a wrapper containing:

let pkg_js_uri = wasm_mt_test::get_pkg_js_uri();

let th = wasm_mt_test::create_mt(&pkg_js_uri).await.thread().and_init().await.unwrap();

exec!(th, async move || test_fn().await).await

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions