mirror of
https://github.com/MingweiSamuel/Riven.git
synced 2025-01-24 01:37:26 -08:00
test: wasm cleanup deprecated static
This commit is contained in:
parent
29a2819341
commit
9ede8f23bb
2 changed files with 4 additions and 3 deletions
|
@ -20,6 +20,7 @@ pub fn env_var<K: AsRef<str>>(key: K) -> Result<String, std::env::VarError> {
|
|||
#[wasm_bindgen]
|
||||
extern "C" {
|
||||
type Process;
|
||||
#[wasm_bindgen(thread_local_v2)]
|
||||
static process: Process;
|
||||
|
||||
type Env;
|
||||
|
@ -32,7 +33,7 @@ pub fn env_var<K: AsRef<str>>(key: K) -> Result<String, std::env::VarError> {
|
|||
}
|
||||
|
||||
process
|
||||
.env()
|
||||
.with(Process::env)
|
||||
.get(key.as_ref())
|
||||
.ok_or(std::env::VarError::NotPresent)
|
||||
}
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue