File tree Expand file tree Collapse file tree 2 files changed +3
-2
lines changed
libraries/System.Net.Http/tests/FunctionalTests Expand file tree Collapse file tree 2 files changed +3
-2
lines changed Original file line number Diff line number Diff line change @@ -584,7 +584,7 @@ public HttpMetricsTest_Http11(ITestOutputHelper output) : base(output)
584584 {
585585 }
586586
587- [ Fact ]
587+ [ ConditionalFact ( typeof ( PlatformDetection ) , nameof ( PlatformDetection . IsNotNodeJS ) ) ]
588588 public async Task RequestDuration_EnrichmentHandler_ContentLengthError_Recorded ( )
589589 {
590590 await LoopbackServerFactory . CreateClientAndServerAsync ( async uri =>
Original file line number Diff line number Diff line change @@ -81,9 +81,10 @@ export async function detect_features_and_polyfill(module: DotnetModuleInternal)
8181 }
8282}
8383
84- const hasFetch = typeof ( globalThis . fetch ) === "function" ;
8584export async function fetch_like ( url : string , init ?: RequestInit ) : Promise < Response > {
8685 try {
86+ // this need to be detected only after we import node modules in onConfigLoaded
87+ const hasFetch = typeof ( globalThis . fetch ) === "function" ;
8788 if ( ENVIRONMENT_IS_NODE ) {
8889 const isFileUrl = url . startsWith ( "file://" ) ;
8990 if ( ! isFileUrl && hasFetch ) {
You can’t perform that action at this time.
0 commit comments