Skip to content

Commit 00f974e

Browse files
fix(tests): Actually checks for the extension properly
Signed-off-by: Taylor Thomas <taylor@cosmonic.com>
1 parent 654097b commit 00f974e

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

crates/wasm-pkg-core/tests/common.rs

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -47,11 +47,13 @@ async fn copy_dir(source: impl AsRef<Path>, destination: impl AsRef<Path>) -> an
4747
))
4848
.await?;
4949
} else {
50-
// Skip any .lock files in the fixture
51-
if entry.path().file_name().unwrap_or_default() == ".lock" {
50+
let path = entry.path();
51+
let extension = path.extension().unwrap_or_default();
52+
// Skip any .lock or .wasm files that might be there from debugging
53+
if extension == "lock" || extension == "wasm" {
5254
continue;
5355
}
54-
tokio::fs::copy(entry.path(), destination.as_ref().join(entry.file_name())).await?;
56+
tokio::fs::copy(path, destination.as_ref().join(entry.file_name())).await?;
5557
}
5658
}
5759
Ok(())

0 commit comments

Comments
 (0)