1
0
Fork 0
mirror of https://github.com/denoland/deno.git synced 2024-11-21 15:04:11 -05:00

chore: add test to ensure parsing only happens once on first load (#23837)

This commit is contained in:
David Sherret 2024-05-21 16:12:40 -04:00 committed by GitHub
parent 9795637724
commit ddb5449f42
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
4 changed files with 11 additions and 0 deletions

View file

@ -77,6 +77,8 @@ impl ParsedSourceCache {
if parsed_source.media_type() == media_type
&& parsed_source.text_info().text_str() == source.as_ref()
{
// note: message used tests
log::debug!("Removed parsed source: {}", specifier);
return Ok(parsed_source);
}
}

View file

@ -0,0 +1,6 @@
// ensures we don't reparse a source file when transpiling
// because it should have already been parsed by module analysis
{
"args": "run --log-level=debug main.ts",
"output": "main.out"
}

View file

@ -0,0 +1,2 @@
[WILDCARD]Removed parsed source: file:///[WILDLINE]/main.ts
[WILDCARD]

View file

@ -0,0 +1 @@
console.log("Hello");