Skip to content

Commit 424ec05

Browse files
fix: review comments from nick
Co-authored-by: Nick Taylor <[email protected]>
1 parent 39c0e97 commit 424ec05

File tree

2 files changed

+7
-7
lines changed

2 files changed

+7
-7
lines changed

test/e2e/next-test-lib/next-modes/base.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -230,7 +230,7 @@ export class NextInstance {
230230

231231
public async destroy(): Promise<void> {
232232
if (this.isDestroyed) {
233-
throw new Error(`next instance already destroyed`)
233+
throw new Error(`Next.js base instance already destroyed`)
234234
}
235235
this.isDestroyed = true
236236
this.emit('destroy', [])

test/e2e/next-test-lib/next-modes/next-deploy.ts

+6-6
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ import fs from 'fs-extra'
44
import { platform } from 'os'
55
import { NextInstance } from './base'
66

7-
type DeployRes = {
7+
type DeployResponse = {
88
name: string
99
site_id: string
1010
site_name: string
@@ -80,7 +80,7 @@ export class NextDeployInstance extends NextInstance {
8080
throw new Error(`Failed to deploy project ${deployRes.stdout} ${deployRes.stderr} (${deployRes.exitCode})`)
8181
}
8282
try {
83-
const data: DeployRes = JSON.parse(deployRes.stdout)
83+
const data: DeployResponse = JSON.parse(deployRes.stdout)
8484
this._url = data.deploy_url
8585
this._deployId = data.deploy_id
8686
console.log(`Deployed to ${this._url}`, data)
@@ -104,7 +104,7 @@ export class NextDeployInstance extends NextInstance {
104104

105105
public async destroy(): Promise<void> {
106106
if (this.isDestroyed) {
107-
throw new Error(`next instance already destroyed`)
107+
throw new Error(`Next.js deploy instance already destroyed`)
108108
}
109109

110110
// During setup() the test site is deployed to Netlify
@@ -113,10 +113,10 @@ export class NextDeployInstance extends NextInstance {
113113
if (!process.env.NEXT_TEST_SKIP_CLEANUP) {
114114
console.log(`Deleting project with deploy_id ${this._deployId}`)
115115

116-
const deleteRes = await execa('ntl', ['api', 'deleteDeploy', '--data', `{ "deploy_id": "${this._deployId}" }`])
116+
const deleteResponse = await execa('ntl', ['api', 'deleteDeploy', '--data', `{ "deploy_id": "${this._deployId}" }`])
117117

118-
if (deleteRes.exitCode !== 0) {
119-
throw new Error(`Failed to delete project ${deleteRes.stdout} ${deleteRes.stderr} (${deleteRes.exitCode})`)
118+
if (deleteResponse.exitCode !== 0) {
119+
throw new Error(`Failed to delete project ${deleteResponse.stdout} ${deleteResponse.stderr} (${deleteResponse.exitCode})`)
120120
}
121121

122122
console.log(`Successfully deleted project with deploy_id ${this._deployId}`)

0 commit comments

Comments
 (0)