File tree 4 files changed +13
-2
lines changed
4 files changed +13
-2
lines changed Original file line number Diff line number Diff line change @@ -250,7 +250,7 @@ jobs:
250
250
SSE_ECHO_SERVER_URL : ' http://localhost:8081/.sse'
251
251
run : |
252
252
cd crates/net
253
- wasm-pack test --chrome --firefox --headless --all- features
253
+ wasm-pack test --chrome --firefox --headless --features=default,io-util,browser-test
254
254
255
255
- uses : dtolnay/rust-toolchain@master
256
256
with :
@@ -262,4 +262,11 @@ jobs:
262
262
HTTPBIN_URL : ' http://localhost:8080'
263
263
WS_ECHO_SERVER_URL : ' ws://localhost:8081'
264
264
SSE_ECHO_SERVER_URL : ' http://localhost:8081/.sse'
265
- run : cargo test -p gloo-net --all-features
265
+ run : cargo test -p gloo-net --features=default,io-util
266
+
267
+ - name : Run node tests
268
+ env :
269
+ HTTPBIN_URL : ' http://localhost:8080'
270
+ WS_ECHO_SERVER_URL : ' ws://localhost:8081'
271
+ SSE_ECHO_SERVER_URL : ' http://localhost:8081/.sse'
272
+ run : wasm-pack test --node crates/net --features=default,io-util
Original file line number Diff line number Diff line change @@ -100,3 +100,5 @@ eventsource = [
100
100
]
101
101
# As of now, only implements `AsyncRead` and `AsyncWrite` on `WebSocket`
102
102
io-util = [" futures-io" ]
103
+ # For test runner only. Enables browser tests.
104
+ browser-test = []
Original file line number Diff line number Diff line change @@ -3,6 +3,7 @@ use once_cell::sync::Lazy;
3
3
use serde:: { Deserialize , Serialize } ;
4
4
use wasm_bindgen_test:: * ;
5
5
6
+ #[ cfg( feature = "browser_test" ) ]
6
7
wasm_bindgen_test_configure ! ( run_in_browser) ;
7
8
8
9
static HTTPBIN_URL : Lazy < & ' static str > =
Original file line number Diff line number Diff line change 1
1
use gloo_net:: http:: QueryParams ;
2
2
use wasm_bindgen_test:: * ;
3
3
4
+ #[ cfg( feature = "browser_test" ) ]
4
5
wasm_bindgen_test_configure ! ( run_in_browser) ;
5
6
6
7
#[ wasm_bindgen_test]
You can’t perform that action at this time.
0 commit comments