mirror of
https://github.com/withastro/astro.git
synced 2024-12-16 21:46:22 -05:00
chore: fix tests in node 18 (#5266)
This commit is contained in:
parent
89f335b539
commit
e3cddb433d
2 changed files with 9 additions and 0 deletions
1
.gitignore
vendored
1
.gitignore
vendored
|
@ -10,6 +10,7 @@ scripts/memory/project/src/pages/
|
|||
package-lock.json
|
||||
.turbo/
|
||||
.eslintcache
|
||||
.pnpm-store
|
||||
|
||||
# ignore top-level vscode settings
|
||||
/.vscode/settings.json
|
||||
|
|
|
@ -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;
|
||||
|
|
Loading…
Reference in a new issue