Skip to content

Commit a9a7329

Browse files
author
Benjamin E. Coe
authored
fix(deps): fix nock version (#1812)
1 parent 2c7dde8 commit a9a7329

2 files changed

Lines changed: 11 additions & 7 deletions

File tree

‎package.json‎

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,6 @@
5353
"@types/mocha": "^5.2.6",
5454
"@types/mv": "^2.1.0",
5555
"@types/ncp": "^2.0.1",
56-
"@types/nock": "^10.0.2",
5756
"@types/node": "^12.0.1",
5857
"@types/nunjucks": "^3.1.1",
5958
"@types/qs": "^6.5.3",
@@ -80,7 +79,7 @@
8079
"mocha": "^6.1.4",
8180
"mv": "^2.1.1",
8281
"ncp": "^2.0.0",
83-
"nock": "^11.0.0",
82+
"nock": "^11.3.2",
8483
"nunjucks": "^3.2.0",
8584
"open": "^6.3.0",
8685
"p-queue": "^6.0.0",

‎test/test.query.ts‎

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// Copyright 2014-2016, Google, Inc.
1+
// Copyright 2016 Google LLC
22
// Licensed under the Apache License, Version 2.0 (the "License");
33
// you may not use this file except in compliance with the License.
44
// You may obtain a copy of the License at
@@ -140,7 +140,8 @@ describe('Query params', () => {
140140
});
141141

142142
it('should be set if params passed are falsy', async () => {
143-
nock(Utils.baseUrl)
143+
const computeRemoteUrl = 'https://compute.googleapis.com';
144+
const r1 = nock(Utils.baseUrl)
144145
.post(
145146
'/compute/v1/projects//zones//instances//setDiskAutoDelete?autoDelete=false&deviceName='
146147
)
@@ -153,7 +154,7 @@ describe('Query params', () => {
153154
deviceName: '',
154155
});
155156
assert.strictEqual(Utils.getQs(res), 'autoDelete=false&deviceName=');
156-
nock(Utils.baseUrl)
157+
const r2 = nock(computeRemoteUrl)
157158
.post(
158159
'/compute/v1/projects//zones//instances//setDiskAutoDelete?autoDelete=false&deviceName='
159160
)
@@ -167,7 +168,7 @@ describe('Query params', () => {
167168
});
168169
assert.strictEqual(Utils.getQs(res2), 'autoDelete=false&deviceName=');
169170

170-
nock(Utils.baseUrl)
171+
const r3 = nock(Utils.baseUrl)
171172
.post('/compute/v1/projects//zones//instanceGroupManagers//resize?size=0')
172173
.reply(200);
173174
const res3 = await localCompute.instanceGroupManagers.resize({
@@ -178,7 +179,7 @@ describe('Query params', () => {
178179
});
179180
assert.strictEqual(Utils.getQs(res3), 'size=0');
180181

181-
nock(Utils.baseUrl)
182+
const r4 = nock(computeRemoteUrl)
182183
.post('/compute/v1/projects//zones//instanceGroupManagers//resize?size=0')
183184
.reply(200);
184185
const res4 = await remoteCompute.instanceGroupManagers.resize({
@@ -187,6 +188,10 @@ describe('Query params', () => {
187188
instanceGroupManager: '',
188189
size: 0,
189190
});
191+
r1.done();
192+
r2.done();
193+
r3.done();
194+
r4.done();
190195
assert.strictEqual(Utils.getQs(res4), 'size=0');
191196
});
192197

0 commit comments

Comments
 (0)