Skip to content

Commit

Permalink
テストが、非systemd-resolved環境などでlocalhostの名前解決が出来ずに失敗するのを修正
Browse files Browse the repository at this point in the history
  • Loading branch information
mei23 committed Oct 28, 2023
1 parent 2c6db29 commit 3ef06e7
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/misc/fetch.ts
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,8 @@ function objectAssignWithLcKey(a: Record<string, string>, b: Record<string, stri
const cache = new CacheableLookup({
maxTtl: 3600, // 1hours
errorTtl: 30, // 30secs
lookup: false, // nativeのdns.lookupにfallbackしない
// testの場合のみnativeのdns.lookupにfallbackする
...(process.env.NODE_ENV === 'test' ? {} : { lookup: false }),
});

/**
Expand Down

0 comments on commit 3ef06e7

Please sign in to comment.