Skip to content
Prev Previous commit
Next Next commit
skip webpack dev tests
  • Loading branch information
chargome committed Oct 9, 2025
commit a0df026eb9b17186e6056556c68098a0cb60ccd5
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ const packageJson = require('../package.json');
test('Sends a client-side exception to Sentry', async ({ page }) => {
const nextjsVersion = packageJson.dependencies.next;
const nextjsMajor = Number(nextjsVersion.split('.')[0]);
const isDevMode = process.env.TEST_ENV === 'development';
const isDevMode = process.env.TEST_ENV.includes('development');

await page.goto('/');

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import { expect, test } from '@playwright/test';
import { waitForError } from '@sentry-internal/test-utils';

test('should have symbolicated dev errors', async ({ page }) => {
test.skip(process.env.TEST_ENV !== 'development', 'should be skipped for non-dev mode');
test.skip(!process.env.TEST_ENV.includes('development'), 'should be skipped for non-dev mode');

await page.goto('/');

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ const packageJson = require('../package.json');
test('Sends a pageload transaction', async ({ page }) => {
const nextjsVersion = packageJson.dependencies.next;
const nextjsMajor = Number(nextjsVersion.split('.')[0]);
const isDevMode = process.env.TEST_ENV === 'development';
Comment thread
chargome marked this conversation as resolved.
const isDevMode = process.env.TEST_ENV.includes('development');

const pageloadTransactionEventPromise = waitForTransaction('nextjs-app-dir', transactionEvent => {
return transactionEvent?.contexts?.trace?.op === 'pageload' && transactionEvent?.transaction === '/';
Expand Down Expand Up @@ -79,7 +79,7 @@ test('Should send a wrapped server action as a child of a nextjs transaction', a
const nextjsVersion = packageJson.dependencies.next;
const nextjsMajor = Number(nextjsVersion.split('.')[0]);
test.skip(!isNaN(nextjsMajor) && nextjsMajor < 14, 'only applies to nextjs apps >= version 14');
test.skip(process.env.TEST_ENV === 'development', 'this magically only works in production');
test.skip(process.env.TEST_ENV.includes('development'), 'this magically only works in production');

const nextjsPostTransactionPromise = waitForTransaction('nextjs-app-dir', async transactionEvent => {
return (
Expand Down
Loading