Skip to content

Commit 72dd1fa

Browse files
committed
removed sinon.createSandbox from nested beforeEach blocks in test.compute.ts, test.jwt.ts, and test.impersonated.ts.
1 parent 3d44561 commit 72dd1fa

4 files changed

Lines changed: 0 additions & 12 deletions

File tree

core/packages/google-auth-library-nodejs/src/auth/regionalaccessboundary.ts

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,6 @@ export interface RegionalAccessBoundaryData {
6363
encodedLocations: string;
6464
}
6565

66-
6766
export interface RegionalAccessBoundaryManagerOptions {
6867
transporter: Gaxios;
6968
getLookupUrl: () => Promise<string | null>;
@@ -82,7 +81,6 @@ export class RegionalAccessBoundaryManager {
8281
this.options = options;
8382
}
8483

85-
8684
/**
8785
* @internal
8886
*/

core/packages/google-auth-library-nodejs/test/test.compute.ts

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -269,8 +269,6 @@ describe('compute', () => {
269269
assert.fail('failed to throw');
270270
});
271271
describe('regional access boundaries', () => {
272-
let sandbox: sinon.SinonSandbox;
273-
274272
const MOCK_ACCESS_TOKEN = 'abc123';
275273
const MOCK_AUTH_HEADER = `Bearer ${MOCK_ACCESS_TOKEN}`;
276274
const EXPECTED_RAB_DATA: RegionalAccessBoundaryData = {
@@ -307,14 +305,12 @@ describe('compute', () => {
307305
}
308306

309307
beforeEach(() => {
310-
sandbox = sinon.createSandbox();
311308
(
312309
Compute.prototype.getRegionalAccessBoundaryUrl as sinon.SinonStub
313310
).restore();
314311
});
315312

316313
afterEach(() => {
317-
sandbox.restore();
318314
nock.cleanAll();
319315
});
320316

core/packages/google-auth-library-nodejs/test/test.impersonated.ts

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -603,7 +603,6 @@ describe('impersonated', () => {
603603
});
604604

605605
describe('regional access boundaries', () => {
606-
let sandbox: sinon.SinonSandbox;
607606
const TARGET_PRINCIPAL_EMAIL = 'target@project.iam.gserviceaccount.com';
608607
const MOCK_ACCESS_TOKEN = 'abc123';
609608
const MOCK_AUTH_HEADER = `Bearer ${MOCK_ACCESS_TOKEN}`;
@@ -628,14 +627,12 @@ describe('impersonated', () => {
628627
}
629628

630629
beforeEach(() => {
631-
sandbox = sinon.createSandbox();
632630
(
633631
Impersonated.prototype.getRegionalAccessBoundaryUrl as sinon.SinonStub
634632
).restore();
635633
});
636634

637635
afterEach(() => {
638-
sandbox.restore();
639636
nock.cleanAll();
640637
});
641638

core/packages/google-auth-library-nodejs/test/test.jwt.ts

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1253,7 +1253,6 @@ describe('jwt', () => {
12531253
});
12541254

12551255
describe('regional access boundaries', () => {
1256-
let sandbox: sinon.SinonSandbox;
12571256
const SERVICE_ACCOUNT_EMAIL = 'service-account@example.com';
12581257
const MOCK_ACCESS_TOKEN = 'abc123';
12591258
const MOCK_AUTH_HEADER = `Bearer ${MOCK_ACCESS_TOKEN}`;
@@ -1279,12 +1278,10 @@ describe('jwt', () => {
12791278
}
12801279

12811280
beforeEach(() => {
1282-
sandbox = sinon.createSandbox();
12831281
(JWT.prototype.getRegionalAccessBoundaryUrl as sinon.SinonStub).restore();
12841282
});
12851283

12861284
afterEach(() => {
1287-
sandbox.restore();
12881285
nock.cleanAll();
12891286
});
12901287

0 commit comments

Comments
 (0)