Skip to content

Commit

Permalink
isNewDevOverlay value should be __NEXT_EXPERIMENTAL_NEW_DEV_OVERLAY
Browse files Browse the repository at this point in the history
  • Loading branch information
devjiwonchoi committed Jan 22, 2025
1 parent a46dd39 commit 57cb856
Show file tree
Hide file tree
Showing 8 changed files with 8 additions and 8 deletions.
2 changes: 1 addition & 1 deletion test/development/app-dir/owner-stack/owner-stack.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ describe('app-dir - owner-stack', () => {
files: __dirname,
})

const isNewDevOverlay = process.env.__NEXT_EXPERIMENTAL_PPR === 'true'
const isNewDevOverlay = !!process.env.__NEXT_EXPERIMENTAL_NEW_DEV_OVERLAY

it('should log stitched error for browser uncaught errors', async () => {
const browser = await next.browser('/browser/uncaught')
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ describe('prerender indicator', () => {
files: __dirname,
})

const isNewDevOverlay = process.env.__NEXT_EXPERIMENTAL_PPR === 'true'
const isNewDevOverlay = !!process.env.__NEXT_EXPERIMENTAL_NEW_DEV_OVERLAY

async function hasStaticIndicator(browser: BrowserInterface) {
if (isNewDevOverlay) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import {
} from 'next-test-utils'

// Enabling PPR testing also enables the new dev overlay.
const isNewDevOverlay = process.env.__NEXT_EXPERIMENTAL_PPR === 'true'
const isNewDevOverlay = !!process.env.__NEXT_EXPERIMENTAL_NEW_DEV_OVERLAY

describe('app-dir - server-component-next-dynamic-ssr-false', () => {
const { next } = nextTestSetup({
Expand Down
2 changes: 1 addition & 1 deletion test/development/app-dir/ssr-in-rsc/ssr-in-rsc.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import {
} from 'next-test-utils'

const isReactExperimental = process.env.__NEXT_EXPERIMENTAL_PPR === 'true'
const isNewDevOverlay = isReactExperimental
const isNewDevOverlay = !!process.env.__NEXT_EXPERIMENTAL_NEW_DEV_OVERLAY
const isReact18 = parseInt(process.env.NEXT_TEST_REACT_VERSION) === 18

describe('react-dom/server in React Server environment', () => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ describe('app-dir - error-on-next-codemod-comment', () => {
skipDeployment: true,
})

const isNewDevOverlay = process.env.__NEXT_EXPERIMENTAL_PPR === 'true'
const isNewDevOverlay = !!process.env.__NEXT_EXPERIMENTAL_NEW_DEV_OVERLAY

if (isNextDev) {
beforeAll(async () => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ describe('use-cache-unknown-cache-kind', () => {
return
}

const isNewDevOverlay = process.env.__NEXT_EXPERIMENTAL_PPR === 'true'
const isNewDevOverlay = !!process.env.__NEXT_EXPERIMENTAL_NEW_DEV_OVERLAY

if (isNextStart) {
it('should fail the build with an error', async () => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ describe('use-cache-without-dynamic-io', () => {
return
}

const isNewDevOverlay = process.env.__NEXT_EXPERIMENTAL_PPR === 'true'
const isNewDevOverlay = !!process.env.__NEXT_EXPERIMENTAL_NEW_DEV_OVERLAY

if (isNextStart) {
it('should fail the build with an error', async () => {
Expand Down
2 changes: 1 addition & 1 deletion test/lib/next-test-utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -990,7 +990,7 @@ export function getRedboxFloatingHeaderText(

export async function getRedboxTotalErrorCount(browser: BrowserInterface) {
// TODO(jiwon): Remove this once we have a new dev overlay at stable.
const isNewDevOverlay = process.env.__NEXT_EXPERIMENTAL_PPR === 'true'
const isNewDevOverlay = !!process.env.__NEXT_EXPERIMENTAL_NEW_DEV_OVERLAY
if (isNewDevOverlay) {
// N/M\nNext.js X.Y.Z -> M
const text = (await getRedboxFloatingHeaderText(browser)) || ''
Expand Down

0 comments on commit 57cb856

Please sign in to comment.