Skip to content

Commit

Permalink
Import NextInstance from e2e-utils instead
Browse files Browse the repository at this point in the history
The lib path is private-ish whereas `e2e-utils` is a public module

Part of #64117 which I split to avoid timeouts in flake detection jobs due to large number of changed tests.
  • Loading branch information
eps1lon committed Apr 8, 2024
1 parent f9ad49f commit 7fad58b
Show file tree
Hide file tree
Showing 34 changed files with 34 additions and 34 deletions.
2 changes: 1 addition & 1 deletion test/e2e/edge-api-endpoints-can-receive-body/index.test.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { createNext, FileRef } from 'e2e-utils'
import { NextInstance } from 'test/lib/next-modes/base'
import { NextInstance } from 'e2e-utils'
import { fetchViaHTTP } from 'next-test-utils'
import path from 'path'

Expand Down
2 changes: 1 addition & 1 deletion test/e2e/edge-can-read-request-body/index.test.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { createNext, FileRef } from 'e2e-utils'
import { NextInstance } from 'test/lib/next-modes/base'
import { NextInstance } from 'e2e-utils'
import { fetchViaHTTP, renderViaHTTP } from 'next-test-utils'
import path from 'path'
import type { Response } from 'node-fetch'
Expand Down
2 changes: 1 addition & 1 deletion test/e2e/edge-can-use-wasm-files/index.test.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { createNext, FileRef } from 'e2e-utils'
import { NextInstance } from 'test/lib/next-modes/base'
import { NextInstance } from 'e2e-utils'
import { fetchViaHTTP } from 'next-test-utils'
import path from 'path'
import fs from 'fs-extra'
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { createNext, FileRef } from 'e2e-utils'
import { NextInstance } from 'test/lib/next-modes/base'
import { NextInstance } from 'e2e-utils'
import { fetchViaHTTP, renderViaHTTP } from 'next-test-utils'
import path from 'path'
import { promises as fs } from 'fs'
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { createNext } from 'e2e-utils'
import { NextInstance } from 'test/lib/next-modes/base'
import { NextInstance } from 'e2e-utils'
import { fetchViaHTTP, shouldRunTurboDevTest } from 'next-test-utils'

describe('Edge compiler module exports preference', () => {
Expand Down
2 changes: 1 addition & 1 deletion test/e2e/edge-configurable-runtime/index.test.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { createNext, FileRef } from 'e2e-utils'
import { NextInstance } from 'test/lib/next-modes/base'
import { NextInstance } from 'e2e-utils'
import { fetchViaHTTP, File, nextBuild } from 'next-test-utils'
import { join } from 'path'
import stripAnsi from 'strip-ansi'
Expand Down
2 changes: 1 addition & 1 deletion test/e2e/getserversideprops/test/index.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ import {
} from 'next-test-utils'
import { join } from 'path'
import webdriver from 'next-webdriver'
import { NextInstance } from 'test/lib/next-modes/base'
import { NextInstance } from 'e2e-utils'

const appDir = join(__dirname, '../app')

Expand Down
2 changes: 1 addition & 1 deletion test/e2e/handle-non-hoisted-swc-helpers/index.test.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { createNext } from 'e2e-utils'
import { NextInstance } from 'test/lib/next-modes/base'
import { NextInstance } from 'e2e-utils'
import { renderViaHTTP } from 'next-test-utils'

describe('handle-non-hoisted-swc-helpers', () => {
Expand Down
2 changes: 1 addition & 1 deletion test/e2e/i18n-api-support/index.test.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { createNext } from 'e2e-utils'
import { fetchViaHTTP } from 'next-test-utils'
import { NextInstance } from 'test/lib/next-modes/base'
import { NextInstance } from 'e2e-utils'

describe('i18n API support', () => {
let next: NextInstance
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { createNext, FileRef } from 'e2e-utils'
import { NextInstance } from 'test/lib/next-modes/base'
import { NextInstance } from 'e2e-utils'
import { check } from 'next-test-utils'
import { join } from 'path'
import webdriver from 'next-webdriver'
Expand Down
2 changes: 1 addition & 1 deletion test/e2e/middleware-responses/test/index.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

import { join } from 'path'
import { fetchViaHTTP } from 'next-test-utils'
import { NextInstance } from 'test/lib/next-modes/base'
import { NextInstance } from 'e2e-utils'
import { createNext, FileRef } from 'e2e-utils'

describe('Middleware Responses', () => {
Expand Down
2 changes: 1 addition & 1 deletion test/e2e/middleware-rewrites/test/index.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
import { join } from 'path'
import cheerio from 'cheerio'
import webdriver from 'next-webdriver'
import { NextInstance } from 'test/lib/next-modes/base'
import { NextInstance } from 'e2e-utils'
import { check, fetchViaHTTP, retry } from 'next-test-utils'
import { createNext, FileRef } from 'e2e-utils'
import escapeStringRegexp from 'escape-string-regexp'
Expand Down
2 changes: 1 addition & 1 deletion test/e2e/middleware-shallow-link/index.test.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { createNext, FileRef } from 'e2e-utils'
import { NextInstance } from 'test/lib/next-modes/base'
import { NextInstance } from 'e2e-utils'
import webdriver from 'next-webdriver'
import { join } from 'path'
import { check } from 'next-test-utils'
Expand Down
2 changes: 1 addition & 1 deletion test/e2e/middleware-trailing-slash/test/index.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import fs from 'fs-extra'
import { join } from 'path'
import webdriver from 'next-webdriver'
import { createNext, FileRef } from 'e2e-utils'
import { NextInstance } from 'test/lib/next-modes/base'
import { NextInstance } from 'e2e-utils'
import { check, fetchViaHTTP, waitFor } from 'next-test-utils'

describe('Middleware Runtime trailing slash', () => {
Expand Down
2 changes: 1 addition & 1 deletion test/e2e/new-link-behavior/child-a-tag-error.test.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { createNext, FileRef, isNextDev } from 'e2e-utils'
import { getRedboxDescription, hasRedbox } from 'next-test-utils'
import { NextInstance } from 'test/lib/next-modes/base'
import { NextInstance } from 'e2e-utils'
import webdriver from 'next-webdriver'
import path from 'path'

Expand Down
2 changes: 1 addition & 1 deletion test/e2e/new-link-behavior/index.test.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { createNext, FileRef } from 'e2e-utils'
import { NextInstance } from 'test/lib/next-modes/base'
import { NextInstance } from 'e2e-utils'
import { renderViaHTTP } from 'next-test-utils'
import webdriver from 'next-webdriver'
import cheerio from 'cheerio'
Expand Down
2 changes: 1 addition & 1 deletion test/e2e/next-font/basepath.test.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import cheerio from 'cheerio'
import { createNext, FileRef } from 'e2e-utils'
import { NextInstance } from 'test/lib/next-modes/base'
import { NextInstance } from 'e2e-utils'
import { renderViaHTTP } from 'next-test-utils'
import { join } from 'path'

Expand Down
2 changes: 1 addition & 1 deletion test/e2e/next-font/google-fetch-error.test.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { createNext, FileRef } from 'e2e-utils'
import { NextInstance } from 'test/lib/next-modes/base'
import { NextInstance } from 'e2e-utils'
import { join } from 'path'
import webdriver from 'next-webdriver'

Expand Down
2 changes: 1 addition & 1 deletion test/e2e/next-font/index.test.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import cheerio from 'cheerio'
import { createNext, FileRef } from 'e2e-utils'
import { NextInstance } from 'test/lib/next-modes/base'
import { NextInstance } from 'e2e-utils'
import { renderViaHTTP, shouldRunTurboDevTest } from 'next-test-utils'
import { join } from 'path'
import webdriver from 'next-webdriver'
Expand Down
2 changes: 1 addition & 1 deletion test/e2e/next-font/with-font-declarations-file.test.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import cheerio from 'cheerio'
import { createNext, FileRef } from 'e2e-utils'
import { NextInstance } from 'test/lib/next-modes/base'
import { NextInstance } from 'e2e-utils'
import { renderViaHTTP } from 'next-test-utils'
import { join } from 'path'

Expand Down
2 changes: 1 addition & 1 deletion test/e2e/next-font/without-preloaded-fonts.test.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import cheerio from 'cheerio'
import { createNext, FileRef } from 'e2e-utils'
import { NextInstance } from 'test/lib/next-modes/base'
import { NextInstance } from 'e2e-utils'
import { renderViaHTTP } from 'next-test-utils'
import { join } from 'path'

Expand Down
2 changes: 1 addition & 1 deletion test/e2e/next-head/index.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import { createNext, FileRef } from 'e2e-utils'
import { renderViaHTTP } from 'next-test-utils'
import cheerio from 'cheerio'
import webdriver from 'next-webdriver'
import { NextInstance } from 'test/lib/next-modes/base'
import { NextInstance } from 'e2e-utils'
import { join } from 'path'

describe('next/head', () => {
Expand Down
2 changes: 1 addition & 1 deletion test/e2e/next-image-forward-ref/index.test.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { createNext, FileRef } from 'e2e-utils'
import { NextInstance } from 'test/lib/next-modes/base'
import { NextInstance } from 'e2e-utils'
import { waitFor } from 'next-test-utils'
import path from 'path'
import webdriver from 'next-webdriver'
Expand Down
2 changes: 1 addition & 1 deletion test/e2e/next-script/index.test.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import webdriver from 'next-webdriver'
import { createNext } from 'e2e-utils'
import { NextInstance } from 'test/lib/next-modes/base'
import { NextInstance } from 'e2e-utils'
import { BrowserInterface } from 'test/lib/browsers/base'
import { check } from 'next-test-utils'

Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { createNext } from 'e2e-utils'
import { NextInstance } from 'test/lib/next-modes/base'
import { NextInstance } from 'e2e-utils'
import { renderViaHTTP } from 'next-test-utils'

describe('no-eslint-warn-with-no-eslint-config', () => {
Expand Down
2 changes: 1 addition & 1 deletion test/e2e/nonce-head-manager/index.test.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { createNext, FileRef } from 'e2e-utils'
import { check } from 'next-test-utils'
import webdriver from 'next-webdriver'
import { NextInstance } from 'test/lib/next-modes/base'
import { NextInstance } from 'e2e-utils'
import { join } from 'path'

describe('nonce head manager', () => {
Expand Down
2 changes: 1 addition & 1 deletion test/e2e/og-api/index.test.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { createNext, FileRef } from 'e2e-utils'
import { NextInstance } from 'test/lib/next-modes/base'
import { NextInstance } from 'e2e-utils'
import { fetchViaHTTP, renderViaHTTP } from 'next-test-utils'
import fs from 'fs-extra'
import { join } from 'path'
Expand Down
2 changes: 1 addition & 1 deletion test/e2e/postcss-config-cjs/index.test.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { createNext, FileRef } from 'e2e-utils'
import { join } from 'path'
import { NextInstance } from 'test/lib/next-modes/base'
import { NextInstance } from 'e2e-utils'
import webdriver from 'next-webdriver'

describe('postcss-config-cjs', () => {
Expand Down
2 changes: 1 addition & 1 deletion test/e2e/proxy-request-with-middleware/test/index.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

import { join } from 'path'
import { fetchViaHTTP } from 'next-test-utils'
import { NextInstance } from 'test/lib/next-modes/base'
import { NextInstance } from 'e2e-utils'
import { createNext, FileRef } from 'e2e-utils'

describe('Requests not effected when middleware used', () => {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { createNext, FileRef } from 'e2e-utils'
import { NextInstance } from 'test/lib/next-modes/base'
import { NextInstance } from 'e2e-utils'
import { check } from 'next-test-utils'
import { join } from 'path'
import webdriver from 'next-webdriver'
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import path from 'path'
import { createNext, FileRef } from 'e2e-utils'
import { NextInstance } from 'test/lib/next-modes/base'
import { NextInstance } from 'e2e-utils'
import { renderViaHTTP } from 'next-test-utils'

const files = {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { createNext, FileRef } from 'e2e-utils'
import { NextInstance } from 'test/lib/next-modes/base'
import { NextInstance } from 'e2e-utils'
import { join } from 'path'

describe('app-dir-hide-suppressed-error-during-next-export', () => {
Expand Down
2 changes: 1 addition & 1 deletion test/production/app-dir-prefetch-non-iso-url/index.test.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { createNext, FileRef } from 'e2e-utils'
import { NextInstance } from 'test/lib/next-modes/base'
import { NextInstance } from 'e2e-utils'
import { join } from 'path'
import { BrowserInterface } from '../../lib/browsers/base'
import webdriver from 'next-webdriver'
Expand Down
2 changes: 1 addition & 1 deletion test/production/app-dir-prevent-304-caching/index.test.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { createNext, FileRef } from 'e2e-utils'
import { NextInstance } from 'test/lib/next-modes/base'
import { NextInstance } from 'e2e-utils'
import { join } from 'path'
import { fetchViaHTTP, waitFor } from 'next-test-utils'

Expand Down

0 comments on commit 7fad58b

Please sign in to comment.