Skip to content

Commit 1f13f25

Browse files
committed
Update tests with newer crate versions.
1 parent 7a7abf9 commit 1f13f25

File tree

5 files changed

+17
-18
lines changed

5 files changed

+17
-18
lines changed

tests/all/build.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -146,8 +146,8 @@ fn dash_dash_web_target_has_error_on_old_bindgen() {
146146
let output = String::from_utf8(cmd.get_output().stderr.clone()).unwrap();
147147

148148
assert!(
149-
output.contains("0.2.39"),
150-
"Output did not contain '0.2.39', output was {}",
149+
output.contains("Please update your project to wasm-bindgen version >= 0.2.39"),
150+
"Output did not contain 'Please update your project to wasm-bindgen version >= 0.2.39', output was {}",
151151
output
152152
);
153153
}

tests/all/download.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ fn can_download_prebuilt_wasm_bindgen() {
1212
let dir = tempfile::TempDir::new().unwrap();
1313
let cache = Cache::at(dir.path());
1414
if let install::Status::Found(dl) =
15-
install::download_prebuilt(&Tool::WasmBindgen, &cache, "0.2.37", true).unwrap()
15+
install::download_prebuilt(&Tool::WasmBindgen, &cache, "0.2.74", true).unwrap()
1616
{
1717
assert!(dl.binary("wasm-bindgen").unwrap().is_file());
1818
assert!(dl.binary("wasm-bindgen-test-runner").unwrap().is_file())
@@ -29,7 +29,7 @@ fn can_download_prebuilt_wasm_bindgen() {
2929
))]
3030
fn downloading_prebuilt_wasm_bindgen_handles_http_errors() {
3131
let dir = tempfile::TempDir::new().unwrap();
32-
let bad_version = "0.2.37-some-trailing-version-stuff-that-does-not-exist";
32+
let bad_version = "0.2.74-some-trailing-version-stuff-that-does-not-exist";
3333
let cache = Cache::at(dir.path());
3434
let result = install::download_prebuilt(&Tool::WasmBindgen, &cache, bad_version, true);
3535
assert!(result.is_err());

tests/all/lockfile.rs

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ fn it_gets_wasm_bindgen_version() {
88
fixture.cargo_check();
99
let data = CrateData::new(&fixture.path, None).unwrap();
1010
let lock = Lockfile::new(&data).unwrap();
11-
assert_eq!(lock.wasm_bindgen_version(), Some("0.2.37"),);
11+
assert_eq!(lock.wasm_bindgen_version(), Some("0.2.74"),);
1212
}
1313

1414
#[test]
@@ -17,7 +17,7 @@ fn it_gets_wasm_bindgen_test_version() {
1717
fixture.cargo_check();
1818
let data = CrateData::new(&fixture.path, None).unwrap();
1919
let lock = Lockfile::new(&data).unwrap();
20-
assert_eq!(lock.wasm_bindgen_test_version(), Some("0.2.37"),);
20+
assert_eq!(lock.wasm_bindgen_test_version(), Some("0.3.24"),);
2121
}
2222

2323
#[test]
@@ -46,7 +46,7 @@ fn it_gets_wasm_bindgen_version_in_crate_inside_workspace() {
4646
crate-type = ["cdylib"]
4747
4848
[dependencies]
49-
wasm-bindgen = "=0.2.37"
49+
wasm-bindgen = "=0.2.74"
5050
"#,
5151
)
5252
.file(
@@ -62,7 +62,7 @@ fn it_gets_wasm_bindgen_version_in_crate_inside_workspace() {
6262
fixture.cargo_check();
6363
let data = CrateData::new(&fixture.path.join("blah"), None).unwrap();
6464
let lock = Lockfile::new(&data).unwrap();
65-
assert_eq!(lock.wasm_bindgen_version(), Some("0.2.37"),);
65+
assert_eq!(lock.wasm_bindgen_version(), Some("0.2.74"),);
6666
}
6767

6868
#[test]
@@ -91,7 +91,7 @@ fn it_gets_wasm_bindgen_version_from_dependencies() {
9191
crate-type = ["cdylib"]
9292
9393
[dependencies]
94-
wasm-bindgen = "=0.2.37"
94+
wasm-bindgen = "=0.2.74"
9595
"#,
9696
)
9797
.file(
@@ -130,5 +130,5 @@ fn it_gets_wasm_bindgen_version_from_dependencies() {
130130
fixture.cargo_check();
131131
let data = CrateData::new(&fixture.path.join("parent"), None).unwrap();
132132
let lock = Lockfile::new(&data).unwrap();
133-
assert_eq!(lock.wasm_bindgen_version(), Some("0.2.37"),);
133+
assert_eq!(lock.wasm_bindgen_version(), Some("0.2.74"),);
134134
}

tests/all/log_level.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@ fn matches_info() -> impl Predicate<str> + PredicateReflection {
99
contains("[INFO]: Checking for the Wasm target...")
1010
.and(contains("[INFO]: Compiling to Wasm..."))
1111
.and(contains("[INFO]: License key is set in Cargo.toml but no LICENSE file(s) were found; Please add the LICENSE file(s) to your project directory"))
12-
.and(contains("[INFO]: Installing wasm-bindgen..."))
1312
.and(contains("[INFO]: Optimizing wasm binaries with `wasm-opt`..."))
1413
.and(contains("[INFO]: :-) Done in "))
1514
.and(contains("[INFO]: :-) Your wasm pkg is ready to publish at "))

tests/all/utils/fixture.rs

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -143,10 +143,10 @@ impl Fixture {
143143
# bindgen downloaded is what we expect, and if `=` is
144144
# removed then it will download whatever the newest version
145145
# of wasm-bindgen is which may not be what's listed here.
146-
wasm-bindgen = "=0.2.37"
146+
wasm-bindgen = "=0.2.74"
147147
148148
[dev-dependencies]
149-
wasm-bindgen-test = "0.2"
149+
wasm-bindgen-test = "0.3"
150150
"#,
151151
name
152152
),
@@ -221,7 +221,7 @@ impl Fixture {
221221

222222
static INSTALL_WASM_BINDGEN: Once = Once::new();
223223
let cache = self.cache();
224-
let version = "0.2.37";
224+
let version = "0.2.74";
225225

226226
let download = || {
227227
if let Ok(download) =
@@ -417,7 +417,7 @@ pub fn no_cdylib() -> Fixture {
417417
wasm-bindgen = "0.2"
418418
419419
[dev-dependencies]
420-
wasm-bindgen-test = "0.2"
420+
wasm-bindgen-test = "0.3"
421421
"#,
422422
);
423423
fixture
@@ -590,7 +590,7 @@ pub fn transitive_dependencies() -> Fixture {
590590
project_b = { path = "../project_b" }
591591
592592
[dev-dependencies]
593-
wasm-bindgen-test = "0.2"
593+
wasm-bindgen-test = "0.3"
594594
"#,
595595
);
596596
fixture.file(
@@ -639,7 +639,7 @@ pub fn transitive_dependencies() -> Fixture {
639639
project_b = { path = "../project_b" }
640640
641641
[dev-dependencies]
642-
wasm-bindgen-test = "0.2"
642+
wasm-bindgen-test = "0.3"
643643
"#,
644644
);
645645
fixture.file(
@@ -688,7 +688,7 @@ pub fn transitive_dependencies() -> Fixture {
688688
wasm-bindgen = "0.2"
689689
690690
[dev-dependencies]
691-
wasm-bindgen-test = "0.2"
691+
wasm-bindgen-test = "0.3"
692692
"#,
693693
);
694694
fixture.file(

0 commit comments

Comments
 (0)