diff --git a/.gitignore b/.gitignore index 8ce8095bc..0f5c68284 100644 --- a/.gitignore +++ b/.gitignore @@ -10,6 +10,7 @@ scripts/memory/project/src/pages/ package-lock.json .turbo/ .eslintcache +.pnpm-store # ignore top-level vscode settings /.vscode/settings.json diff --git a/packages/astro/test/test-utils.js b/packages/astro/test/test-utils.js index 45ecabd52..29527df72 100644 --- a/packages/astro/test/test-utils.js +++ b/packages/astro/test/test-utils.js @@ -70,6 +70,14 @@ export async function loadFixture(inlineConfig) { if (!inlineConfig || !inlineConfig.root) throw new Error("Must provide { root: './fixtures/...' }"); + // Compatible with different Node versions (https://vitejs.dev/guide/migration.html#dev-server-changes) + // TODO: Remove this to test in Node >= 17 where the dns resolver is verbatim + if (!inlineConfig?.server) { + inlineConfig.server = { + host: '127.0.0.1' + } + } + // load config let cwd = inlineConfig.root; delete inlineConfig.root;