Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(deps): fix nock version #1812

Merged
merged 4 commits into from Sep 5, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
3 changes: 1 addition & 2 deletions package.json
Expand Up @@ -53,7 +53,6 @@
"@types/mocha": "^5.2.6",
"@types/mv": "^2.1.0",
"@types/ncp": "^2.0.1",
"@types/nock": "^10.0.2",
"@types/node": "^12.0.1",
"@types/nunjucks": "^3.1.1",
"@types/qs": "^6.5.3",
Expand All @@ -80,7 +79,7 @@
"mocha": "^6.1.4",
"mv": "^2.1.1",
"ncp": "^2.0.0",
"nock": "^11.0.0",
"nock": "^11.3.2",
"nunjucks": "^3.2.0",
"open": "^6.3.0",
"p-queue": "^6.0.0",
Expand Down
15 changes: 10 additions & 5 deletions test/test.query.ts
@@ -1,4 +1,4 @@
// Copyright 2014-2016, Google, Inc.
// Copyright 2016 Google LLC
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
Expand Down Expand Up @@ -140,7 +140,8 @@ describe('Query params', () => {
});

it('should be set if params passed are falsy', async () => {
nock(Utils.baseUrl)
const computeRemoteUrl = 'https://compute.googleapis.com';
const r1 = nock(Utils.baseUrl)
.post(
'/compute/v1/projects//zones//instances//setDiskAutoDelete?autoDelete=false&deviceName='
)
Expand All @@ -153,7 +154,7 @@ describe('Query params', () => {
deviceName: '',
});
assert.strictEqual(Utils.getQs(res), 'autoDelete=false&deviceName=');
nock(Utils.baseUrl)
const r2 = nock(computeRemoteUrl)
.post(
'/compute/v1/projects//zones//instances//setDiskAutoDelete?autoDelete=false&deviceName='
)
Expand All @@ -167,7 +168,7 @@ describe('Query params', () => {
});
assert.strictEqual(Utils.getQs(res2), 'autoDelete=false&deviceName=');

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

nock(Utils.baseUrl)
const r4 = nock(computeRemoteUrl)
.post('/compute/v1/projects//zones//instanceGroupManagers//resize?size=0')
.reply(200);
const res4 = await remoteCompute.instanceGroupManagers.resize({
Expand All @@ -187,6 +188,10 @@ describe('Query params', () => {
instanceGroupManager: '',
size: 0,
});
r1.done();
r2.done();
r3.done();
r4.done();
assert.strictEqual(Utils.getQs(res4), 'size=0');
});

Expand Down