Skip to content

Commit c9c3183

Browse files
authored
Remove un-needed test dependency (#32616)
* Remove un-needed test dependency * update test * update compiled
1 parent 09456cb commit c9c3183

File tree

9 files changed

+9
-44
lines changed

9 files changed

+9
-44
lines changed

package.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,6 @@
8787
"async-sema": "3.0.1",
8888
"browserslist": "4.18.1",
8989
"cheerio": "0.22.0",
90-
"clone": "2.1.2",
9190
"cookie": "0.4.1",
9291
"cors": "2.8.5",
9392
"coveralls": "3.0.3",

packages/next/compiled/ora/index.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

test/integration/api-body-parser/test/index.test.js

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@ import {
88
fetchViaHTTP,
99
initNextServerScript,
1010
} from 'next-test-utils'
11-
import clone from 'clone'
1211
import getPort from 'get-port'
1312

1413
const appDir = join(__dirname, '../')
@@ -70,12 +69,7 @@ async function makeRequestWithInvalidContentType() {
7069
const startServer = async (optEnv = {}, opts) => {
7170
const scriptPath = join(appDir, 'server.js')
7271
context.appPort = appPort = await getPort()
73-
const env = Object.assign(
74-
{},
75-
clone(process.env),
76-
{ PORT: `${appPort}` },
77-
optEnv
78-
)
72+
const env = Object.assign({ ...process.env }, { PORT: `${appPort}` }, optEnv)
7973

8074
server = await initNextServerScript(
8175
scriptPath,

test/integration/custom-server/test/index.test.js

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@ import webdriver from 'next-webdriver'
44
import { join } from 'path'
55
import getPort from 'get-port'
66
import cheerio from 'cheerio'
7-
import clone from 'clone'
87
import {
98
initNextServerScript,
109
killApp,
@@ -27,8 +26,7 @@ const startServer = async (optEnv = {}, opts) => {
2726
const scriptPath = join(appDir, 'server.js')
2827
context.appPort = appPort = await getPort()
2928
const env = Object.assign(
30-
{},
31-
clone(process.env),
29+
{ ...process.env },
3230
{ PORT: `${appPort}`, __NEXT_TEST_MODE: 'true' },
3331
optEnv
3432
)

test/integration/fetch-polyfill-ky-universal/test/index.test.js

Lines changed: 2 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@ import {
1111
nextBuild,
1212
nextStart,
1313
} from 'next-test-utils'
14-
import clone from 'clone'
1514

1615
const appDir = join(__dirname, '../')
1716
const nextConfig = join(appDir, 'next.config.js')
@@ -24,8 +23,7 @@ const startApiServer = async (optEnv = {}, opts) => {
2423
const scriptPath = join(appDir, 'api-server.js')
2524
apiServerPort = await findPort()
2625
const env = Object.assign(
27-
{},
28-
clone(process.env),
26+
{ ...process.env },
2927
{ PORT: `${apiServerPort}` },
3028
optEnv
3129
)
@@ -42,12 +40,7 @@ const startApiServer = async (optEnv = {}, opts) => {
4240
const startServerlessServer = async (optEnv = {}, opts) => {
4341
const scriptPath = join(appDir, 'serverless-server.js')
4442
appPort = await findPort()
45-
const env = Object.assign(
46-
{},
47-
clone(process.env),
48-
{ PORT: `${appPort}` },
49-
optEnv
50-
)
43+
const env = Object.assign({ ...process.env }, { PORT: `${appPort}` }, optEnv)
5144

5245
return await initNextServerScript(
5346
scriptPath,

test/integration/fetch-polyfill/test/index.test.js

Lines changed: 2 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,6 @@ import {
1212
nextBuild,
1313
nextStart,
1414
} from 'next-test-utils'
15-
import clone from 'clone'
1615
import cheerio from 'cheerio'
1716

1817
const appDir = join(__dirname, '../')
@@ -26,8 +25,7 @@ const startApiServer = async (optEnv = {}, opts) => {
2625
const scriptPath = join(appDir, 'api-server.js')
2726
apiServerPort = await findPort()
2827
const env = Object.assign(
29-
{},
30-
clone(process.env),
28+
{ ...process.env },
3129
{ PORT: `${apiServerPort}` },
3230
optEnv
3331
)
@@ -44,12 +42,7 @@ const startApiServer = async (optEnv = {}, opts) => {
4442
const startServerlessServer = async (optEnv = {}, opts) => {
4543
const scriptPath = join(appDir, 'serverless-server.js')
4644
appPort = await findPort()
47-
const env = Object.assign(
48-
{},
49-
clone(process.env),
50-
{ PORT: `${appPort}` },
51-
optEnv
52-
)
45+
const env = Object.assign({ ...process.env }, { PORT: `${appPort}` }, optEnv)
5346

5447
return await initNextServerScript(
5548
scriptPath,

test/integration/filesystempublicroutes/test/index.test.js

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@ import {
88
killApp,
99
getPageFileFromBuildManifest,
1010
} from 'next-test-utils'
11-
import clone from 'clone'
1211

1312
const appDir = join(__dirname, '../')
1413
let appPort
@@ -19,12 +18,7 @@ const context = {}
1918
const startServer = async (optEnv = {}) => {
2019
const scriptPath = join(appDir, 'server.js')
2120
context.appPort = appPort = await getPort()
22-
const env = Object.assign(
23-
{},
24-
clone(process.env),
25-
{ PORT: `${appPort}` },
26-
optEnv
27-
)
21+
const env = Object.assign({ ...process.env }, { PORT: `${appPort}` }, optEnv)
2822

2923
server = await initNextServerScript(scriptPath, /ready on/i, env)
3024
}

test/integration/ondemand/test/index.test.js

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@ import WebSocket from 'ws'
33
import { join } from 'path'
44
import webdriver from 'next-webdriver'
55
import getPort from 'get-port'
6-
import clone from 'clone'
76
import {
87
renderViaHTTP,
98
fetchViaHTTP,
@@ -24,8 +23,7 @@ const startServer = async (optEnv = {}, opts) => {
2423
const scriptPath = join(appDir, 'server.js')
2524
context.appPort = await getPort()
2625
const env = Object.assign(
27-
{},
28-
clone(process.env),
26+
{ ...process.env },
2927
{ PORT: `${context.appPort}` },
3028
optEnv
3129
)

yarn.lock

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7100,10 +7100,6 @@ clone-response@^1.0.2:
71007100
dependencies:
71017101
mimic-response "^1.0.0"
71027102

7103-
7104-
version "2.1.2"
7105-
resolved "https://registry.yarnpkg.com/clone/-/clone-2.1.2.tgz#1b7f4b9f591f1e8f83670401600345a02887435f"
7106-
71077103
clone@^1.0.2:
71087104
version "1.0.4"
71097105
resolved "https://registry.yarnpkg.com/clone/-/clone-1.0.4.tgz#da309cc263df15994c688ca902179ca3c7cd7c7e"

0 commit comments

Comments
 (0)