Skip to content

Commit 06fd92c

Browse files
committed
test: Update wasm-bindgen version in tests
1 parent 7ff4f25 commit 06fd92c

File tree

3 files changed

+8
-14
lines changed

3 files changed

+8
-14
lines changed

tests/all/lockfile.rs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ fn it_gets_wasm_bindgen_version() {
99
fixture.cargo_check();
1010
let data = CrateData::new(&fixture.path, None).unwrap();
1111
let lock = Lockfile::new(&data).unwrap();
12-
assert_eq!(lock.wasm_bindgen_version(), Some("0.2.95"),);
12+
assert_eq!(lock.wasm_bindgen_version(), Some("0.2.100"),);
1313
}
1414

1515
#[test]
@@ -48,7 +48,7 @@ fn it_gets_wasm_bindgen_version_in_crate_inside_workspace() {
4848
crate-type = ["cdylib"]
4949
5050
[dependencies]
51-
wasm-bindgen = "=0.2.95"
51+
wasm-bindgen = "=0.2.100"
5252
"#,
5353
)
5454
.file(
@@ -64,7 +64,7 @@ fn it_gets_wasm_bindgen_version_in_crate_inside_workspace() {
6464
fixture.cargo_check();
6565
let data = CrateData::new(&fixture.path.join("blah"), None).unwrap();
6666
let lock = Lockfile::new(&data).unwrap();
67-
assert_eq!(lock.wasm_bindgen_version(), Some("0.2.95"),);
67+
assert_eq!(lock.wasm_bindgen_version(), Some("0.2.100"),);
6868
}
6969

7070
#[test]
@@ -93,7 +93,7 @@ fn it_gets_wasm_bindgen_version_from_dependencies() {
9393
crate-type = ["cdylib"]
9494
9595
[dependencies]
96-
wasm-bindgen = "=0.2.95"
96+
wasm-bindgen = "=0.2.100"
9797
"#,
9898
)
9999
.file(
@@ -132,5 +132,5 @@ fn it_gets_wasm_bindgen_version_from_dependencies() {
132132
fixture.cargo_check();
133133
let data = CrateData::new(&fixture.path.join("parent"), None).unwrap();
134134
let lock = Lockfile::new(&data).unwrap();
135-
assert_eq!(lock.wasm_bindgen_version(), Some("0.2.95"),);
135+
assert_eq!(lock.wasm_bindgen_version(), Some("0.2.100"),);
136136
}

tests/all/readme.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ fn it_copies_a_readme_provided_path() {
6060
# bindgen downloaded is what we expect, and if `=` is
6161
# removed then it will download whatever the newest version
6262
# of wasm-bindgen is which may not be what's listed here.
63-
wasm-bindgen = "=0.2.95"
63+
wasm-bindgen = "=0.2.100"
6464
6565
[dev-dependencies]
6666
wasm-bindgen-test = "0.3"

tests/all/test.rs

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -309,13 +309,11 @@ fn test_output_is_printed_once_in_both_stdout_and_failures() {
309309
extern crate wasm_bindgen_test;
310310
use wasm_bindgen::prelude::*;
311311
use wasm_bindgen_test::*;
312-
313312
#[wasm_bindgen]
314313
extern {
315314
#[wasm_bindgen(js_namespace = console)]
316315
fn log(s: &str);
317316
}
318-
319317
#[wasm_bindgen_test]
320318
fn yabba() {
321319
log("YABBA DABBA DOO");
@@ -325,19 +323,15 @@ fn test_output_is_printed_once_in_both_stdout_and_failures() {
325323
)
326324
.install_local_wasm_bindgen();
327325
let _lock = fixture.lock();
328-
329-
// there will be only one log in stdout, and only one log in failures
330-
let log_cnt = 1;
326+
// With newer wasm-bindgen-test, logs only appear once in the failure output
331327
fixture
332328
.wasm_pack()
333329
.arg("test")
334330
.arg("--node")
335331
.assert()
336332
.failure()
337333
.stdout(predicate::function(|out: &str| {
338-
// but the out string will capture both stdout and failures,
339-
// so we will get a log that count twice
340-
out.matches("YABBA DABBA DOO").count() == log_cnt * 2
334+
out.matches("YABBA DABBA DOO").count() == 1
341335
}));
342336
}
343337

0 commit comments

Comments
 (0)