cross-test

Crates.iocross-test
lib.rscross-test
version0.1.6
sourcesrc
created_at2021-01-13 20:00:36.63073
updated_at2021-01-27 21:44:24.327471
descriptionNative and web testing in a single framework
homepage
repositoryhttps://github.com/notdanilo/cross-test
max_upload_size
id341523
size15,721
Danilo Guanabara (notdanilo)

documentation

https://docs.rs/cross-test

README

cross-test

Run Rust native and web tests with a single framework.

Platforms

  • Web: web-sys
  • Native: tokio

Example

use cross_test::prelude::*;

cross_test_configure!();

#[cross_test]
async fn it_works() {
   assert_eq!(2 + 2, 4);
}

Important issue

Because #[cross_test] gets translated to #[tokio::test] all the tests must be async.

A custom proc-macro will be provided to select the test executor if the async work is present or not.

Link for the issue: https://github.com/notdanilo/cross-test/issues/1

Commit count: 23

cargo fmt