Skip to content

Commit 2219676

Browse files
committed
Set up Next.JS tests for Node 18.
1 parent 5d740ac commit 2219676

File tree

2 files changed

+10
-0
lines changed

2 files changed

+10
-0
lines changed

packages/e2e-tests/test-applications/create-next-app/playwright.config.ts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,11 @@
11
import type { PlaywrightTestConfig } from '@playwright/test';
22
import { devices } from '@playwright/test';
33

4+
// Fix urls not resolving to localhost on Node v17+
5+
// See: https://github.com/axios/axios/issues/3821#issuecomment-1413727575
6+
import { setDefaultResultOrder } from 'dns';
7+
setDefaultResultOrder('ipv4first');
8+
49
const testEnv = process.env.TEST_ENV;
510

611
if (!testEnv) {

packages/e2e-tests/test-applications/nextjs-app-dir/playwright.config.ts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,11 @@
11
import type { PlaywrightTestConfig } from '@playwright/test';
22
import { devices } from '@playwright/test';
33

4+
// Fix urls not resolving to localhost on Node v17+
5+
// See: https://github.com/axios/axios/issues/3821#issuecomment-1413727575
6+
import { setDefaultResultOrder } from 'dns';
7+
setDefaultResultOrder('ipv4first');
8+
49
const testEnv = process.env.TEST_ENV;
510

611
if (!testEnv) {

0 commit comments

Comments
 (0)