diff options
Diffstat (limited to 'tests/integration/npm_tests.rs')
-rw-r--r-- | tests/integration/npm_tests.rs | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/tests/integration/npm_tests.rs b/tests/integration/npm_tests.rs index 871f09d15..82f0697d5 100644 --- a/tests/integration/npm_tests.rs +++ b/tests/integration/npm_tests.rs @@ -950,9 +950,13 @@ fn ensure_registry_files_local() { let registry_json_path = registry_dir_path .join(entry.file_name()) .join("registry.json"); + if registry_json_path.exists() { let file_text = std::fs::read_to_string(®istry_json_path).unwrap(); - if file_text.contains("https://registry.npmjs.org/") { + if file_text.contains(&format!( + "https://registry.npmjs.org/{}/-/", + entry.file_name().to_string_lossy() + )) { panic!( "file {} contained a reference to the npm registry", registry_json_path |