From 9ede8f23bbb635981b6cf4cc7569ed59b60d58bf Mon Sep 17 00:00:00 2001 From: Mingwei Samuel Date: Mon, 13 Jan 2025 11:56:03 -0800 Subject: [PATCH] test: wasm cleanup deprecated static --- riven/tests/testutils.rs | 3 ++- test-wasm.bash | 4 ++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/riven/tests/testutils.rs b/riven/tests/testutils.rs index 3ebf68c..af44d72 100644 --- a/riven/tests/testutils.rs +++ b/riven/tests/testutils.rs @@ -20,6 +20,7 @@ pub fn env_var>(key: K) -> Result { #[wasm_bindgen] extern "C" { type Process; + #[wasm_bindgen(thread_local_v2)] static process: Process; type Env; @@ -32,7 +33,7 @@ pub fn env_var>(key: K) -> Result { } process - .env() + .with(Process::env) .get(key.as_ref()) .ok_or(std::env::VarError::NotPresent) } diff --git a/test-wasm.bash b/test-wasm.bash index 840140f..3a44441 100644 --- a/test-wasm.bash +++ b/test-wasm.bash @@ -5,8 +5,8 @@ export RGAPI_KEY="$(cat apikey.txt)" cd riven -# Ensure builds with tracing. -wasm-pack build -- --features nightly,tracing +# Ensure builds with tracing, metrics. +wasm-pack build -- --features nightly,tracing,metrics # Run tests. wasm-pack test --node -- --features nightly,deny-unknown