From 8f3234a7fe41e3d8f105fcf2a49b9b55ec8ac80b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E4=B8=9C=E7=81=AF?= Date: Thu, 25 Jul 2024 19:14:02 +0800 Subject: [PATCH] chore: add test tools (#410) --- .vscode/settings.json | 9 +++++---- test.sh | 7 +++++++ 2 files changed, 12 insertions(+), 4 deletions(-) create mode 100755 test.sh diff --git a/.vscode/settings.json b/.vscode/settings.json index 9488bf164..21692d86b 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -43,9 +43,7 @@ "RUST_BACKTRACE": "full", "DEBUG": "*" }, - "rust-analyzer.cargo.features": [ - "test_utils" - ], + "rust-analyzer.cargo.features": ["test_utils"], "editor.defaultFormatter": "rust-lang.rust-analyzer", "rust-analyzer.server.extraEnv": { "RUSTUP_TOOLCHAIN": "stable" @@ -72,5 +70,8 @@ "[typescript]": { "editor.defaultFormatter": "denoland.vscode-deno" }, - "vitest.enable": true + "vitest.enable": true, + "[shellscript]": { + "editor.defaultFormatter": "foxundermoon.shell-format" + } } diff --git a/test.sh b/test.sh new file mode 100755 index 000000000..031c08619 --- /dev/null +++ b/test.sh @@ -0,0 +1,7 @@ +Mode="$*" + +if [ $Mode == "wasm" ]; then + cargo test --features test_utils wasm -- --show-output +else + cargo test --features test_utils -- --show-output +fi