diff --git a/test/integration/production/test/index.test.js b/test/integration/production/test/index.test.js index 1f14d3ac0dfd1..51683cd6139fd 100644 --- a/test/integration/production/test/index.test.js +++ b/test/integration/production/test/index.test.js @@ -1,6 +1,5 @@ /* eslint-env jest */ /* global browserName */ -import os from 'os' import cheerio from 'cheerio' import fs, { existsSync } from 'fs-extra' import globOriginal from 'glob' @@ -94,13 +93,13 @@ describe('Production Usage', () => { file.includes('next/dist/server/load-components.js') ) ).toBe(true) - expect( - serverTrace.files.some((file) => - file.includes('next/dist/compiled/webpack/bundle5.js') - ) - ).toBe(false) - if (os.platform() !== 'win32') { + if (process.platform !== 'win32') { + expect( + serverTrace.files.some((file) => + file.includes('next/dist/compiled/webpack/bundle5.js') + ) + ).toBe(false) expect( serverTrace.files.some((file) => file.includes('node_modules/sharp')) ).toBe(false) diff --git a/test/production/required-server-files.test.ts b/test/production/required-server-files.test.ts index fdc6219e2df2e..3dc8e6287d410 100644 --- a/test/production/required-server-files.test.ts +++ b/test/production/required-server-files.test.ts @@ -81,7 +81,7 @@ describe('should set-up next', () => { }) const nextServerTraceFiles = nextServerTrace.files.map((file) => { - return join(next.testDir, '.next/', file) + return join(next.testDir, '.next', file) }) for (const file of allFiles) {