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 6c830e7
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-async-local-storage/index.test.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/* eslint-disable jest/valid-expect-in-promise */
import { createNext } from 'e2e-utils'
import { NextInstance } from 'test/lib/next-modes/base'
import { NextInstance } from 'e2e-utils'
import { fetchViaHTTP } from 'next-test-utils'

describe('edge api can use async local storage', () => {
Expand Down
2 changes: 1 addition & 1 deletion test/production/custom-error-500/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 { check, renderViaHTTP } from 'next-test-utils'

describe('custom-error-500', () => {
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 } from 'next-test-utils'

describe('dependencies can use env vars in middlewares', () => {
Expand Down
2 changes: 1 addition & 1 deletion test/production/disable-fallback-polyfills/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'

describe('Disable fallback polyfills', () => {
let next: NextInstance
Expand Down
2 changes: 1 addition & 1 deletion test/production/edge-config-validations/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'

describe('Edge config validations', () => {
let next: NextInstance
Expand Down
2 changes: 1 addition & 1 deletion test/production/edge-runtime-is-addressable/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 { fetchViaHTTP } from 'next-test-utils'
import fs from 'fs-extra'
import path from 'path'
Expand Down
2 changes: 1 addition & 1 deletion test/production/emit-decorator-metadata/index.test.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
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 { BrowserInterface } from 'test/lib/browsers/base'
import { fetchViaHTTP } from 'next-test-utils'

Expand Down
2 changes: 1 addition & 1 deletion test/production/enoent-during-require/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 { check, renderViaHTTP } from 'next-test-utils'

describe('ENOENT during require', () => {
Expand Down
2 changes: 1 addition & 1 deletion test/production/escheck-output/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'

describe('ES Check .next output', () => {
let next: NextInstance
Expand Down
2 changes: 1 addition & 1 deletion test/production/eslint-plugin-deps/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('eslint plugin deps', () => {
Expand Down
2 changes: 1 addition & 1 deletion test/production/fallback-export-error/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'

describe('fallback export error', () => {
Expand Down
2 changes: 1 addition & 1 deletion test/production/fatal-render-errror/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 { check, renderViaHTTP, waitFor } from 'next-test-utils'
import webdriver from 'next-webdriver'
import { join } from 'path'
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 fs from 'fs-extra'
import path from 'path'

Expand Down
2 changes: 1 addition & 1 deletion test/production/jest/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('next/jest', () => {
Expand Down
2 changes: 1 addition & 1 deletion test/production/jest/new-link-behavior.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'

describe('next/jest newLinkBehavior', () => {
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 path from 'path'
import execa from 'execa'

Expand Down
2 changes: 1 addition & 1 deletion test/production/jest/relay/relay-jest.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 path from 'path'

const appDir = path.join(__dirname, 'app')
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 { renderViaHTTP } from 'next-test-utils'
import path from 'path'

Expand Down
2 changes: 1 addition & 1 deletion test/production/jest/transpile-packages.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('next/jest', () => {
let next: NextInstance
Expand Down
2 changes: 1 addition & 1 deletion test/production/next-font/babel-unsupported.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'

describe('@next/fon babel unsupported', () => {
Expand Down
2 changes: 1 addition & 1 deletion test/production/next-font/telemetry-old.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 { findAllTelemetryEvents } from 'next-test-utils'
import { join } from 'path'

Expand Down
2 changes: 1 addition & 1 deletion test/production/next-font/telemetry.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 { findAllTelemetryEvents } from 'next-test-utils'
import { join } from 'path'

Expand Down
2 changes: 1 addition & 1 deletion test/production/pnpm-support/index.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import path from 'path'
import fs from 'fs-extra'
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 {
findPort,
initNextServerScript,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { createNext } from 'e2e-utils'
import { renderViaHTTP } from 'next-test-utils'
import { NextInstance } from 'test/lib/next-modes/base'
import { NextInstance } from 'e2e-utils'

describe('PostCSS plugin config as string', () => {
let next: NextInstance
Expand Down
2 changes: 1 addition & 1 deletion test/production/prerender-prefetch/index.test.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { NextInstance } from 'test/lib/next-modes/base'
import { NextInstance } from 'e2e-utils'
import { createNext, FileRef } from 'e2e-utils'
import {
check,
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 } from 'next-test-utils'

describe('reading request body in middleware', () => {
Expand Down
2 changes: 1 addition & 1 deletion test/production/standalone-mode/optimizecss/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('standalone mode and optimizeCss', () => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import fs from 'fs-extra'
import { join } from 'path'
import cheerio from 'cheerio'
import { createNext, FileRef } from 'e2e-utils'
import { NextInstance } from 'test/lib/next-modes/base'
import { NextInstance } from 'e2e-utils'
import {
fetchViaHTTP,
findPort,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import fs from 'fs-extra'
import cheerio from 'cheerio'
import { join } from 'path'
import { createNext, FileRef } from 'e2e-utils'
import { NextInstance } from 'test/lib/next-modes/base'
import { NextInstance } from 'e2e-utils'
import {
check,
fetchViaHTTP,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import fs from 'fs-extra'
import { join } from 'path'
import cheerio from 'cheerio'
import { createNext, FileRef } from 'e2e-utils'
import { NextInstance } from 'test/lib/next-modes/base'
import { NextInstance } from 'e2e-utils'
import {
fetchViaHTTP,
findPort,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import cheerio from 'cheerio'
import { join } from 'path'
import { nanoid } from 'nanoid'
import { createNext, FileRef } from 'e2e-utils'
import { NextInstance } from 'test/lib/next-modes/base'
import { NextInstance } from 'e2e-utils'
import {
check,
fetchViaHTTP,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import fs from 'fs-extra'
import { join } from 'path'
import cheerio from 'cheerio'
import { createNext, FileRef } from 'e2e-utils'
import { NextInstance } from 'test/lib/next-modes/base'
import { NextInstance } from 'e2e-utils'
import {
killApp,
findPort,
Expand Down
2 changes: 1 addition & 1 deletion test/production/standalone-mode/type-module/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 { join } from 'path'
import fs from 'fs-extra'
import {
Expand Down
2 changes: 1 addition & 1 deletion test/production/typescript-basic/index.test.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import path from 'path'
import { createNext, FileRef } from 'e2e-utils'
import { renderViaHTTP } from 'next-test-utils'
import { NextInstance } from 'test/lib/next-modes/base'
import { NextInstance } from 'e2e-utils'

describe('TypeScript basic', () => {
let next: NextInstance
Expand Down

0 comments on commit 6c830e7

Please sign in to comment.