add wasm-bindgen-test

This commit is contained in:
bitfl0wer 2023-11-19 22:49:41 +01:00
parent 1203e20358
commit 5826ccd923
3 changed files with 45 additions and 3 deletions

42
Cargo.lock generated
View File

@ -223,6 +223,7 @@ dependencies = [
"tokio",
"tokio-tungstenite",
"url",
"wasm-bindgen-test",
"ws_stream_wasm",
]
@ -252,6 +253,16 @@ dependencies = [
"windows-targets",
]
[[package]]
name = "console_error_panic_hook"
version = "0.1.7"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "a06aeb73f470f66dcdbf7223caeebb85984942f22f1adb2a088cf9668146bbbc"
dependencies = [
"cfg-if",
"wasm-bindgen",
]
[[package]]
name = "const-oid"
version = "0.9.5"
@ -1674,6 +1685,12 @@ dependencies = [
"windows-sys",
]
[[package]]
name = "scoped-tls"
version = "1.0.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "e1cf6437eb19a8f4a6cc0f7dca544973b0b78843adbfeb3683d1a94a0024a294"
[[package]]
name = "scopeguard"
version = "1.2.0"
@ -2627,6 +2644,31 @@ version = "0.2.88"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "0d046c5d029ba91a1ed14da14dca44b68bf2f124cfbaf741c54151fdb3e0750b"
[[package]]
name = "wasm-bindgen-test"
version = "0.3.38"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "c6433b7c56db97397842c46b67e11873eda263170afeb3a2dc74a7cb370fee0d"
dependencies = [
"console_error_panic_hook",
"js-sys",
"scoped-tls",
"wasm-bindgen",
"wasm-bindgen-futures",
"wasm-bindgen-test-macro",
]
[[package]]
name = "wasm-bindgen-test-macro"
version = "0.3.38"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "493fcbab756bb764fa37e6bee8cec2dd709eb4273d06d0c282a5e74275ded735"
dependencies = [
"proc-macro2",
"quote",
"syn 2.0.39",
]
[[package]]
name = "web-sys"
version = "0.3.65"

View File

@ -54,9 +54,10 @@ sqlx = { version = "0.7.1", features = [
], optional = true }
safina-timer = "0.1.11"
rand = "0.8.5"
# TODO: Remove the below 2 imports for production!
# TODO: Remove the below 3 imports for production!
ws_stream_wasm = "0.7.4"
pharos = "0.5.3"
wasm-bindgen-test = "0.3.38"
[target.'cfg(not(target_arch = "wasm32"))'.dependencies]
rustls = "0.21.8"
@ -70,9 +71,8 @@ hostname = "0.3.1"
[target.'cfg(target_arch = "wasm32")'.dependencies]
getrandom = { version = "0.2.11", features = ["js"] }
tokio-tungstenite = { version = "0.20.1", default-features = false }
ws_stream_wasm = "0.7.4"
pharos = "0.5.3"
wasm-bindgen-test = "0.3.38"
[dev-dependencies]

0
tests/wasm.rs Normal file
View File