Skip to content

Commit 628078f

Browse files
committed
clean up comments
1 parent d81fa18 commit 628078f

File tree

1 file changed

+0
-31
lines changed

1 file changed

+0
-31
lines changed

test/unit/app/credential-internal.spec.ts

Lines changed: 0 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -23,12 +23,10 @@ import path = require('path');
2323

2424
import * as _ from 'lodash';
2525
import * as chai from 'chai';
26-
//import * as nock from 'nock';
2726
import * as sinon from 'sinon';
2827
import * as sinonChai from 'sinon-chai';
2928
import * as chaiAsPromised from 'chai-as-promised';
3029

31-
//import * as utils from '../utils';
3230
import * as mocks from '../../resources/mocks';
3331

3432
import {
@@ -38,8 +36,6 @@ import {
3836
RefreshTokenCredential, ServiceAccountCredential,
3937
getApplicationDefault, isApplicationDefault, ImpersonatedServiceAccountCredential, ApplicationDefaultCredential
4038
} from '../../../src/app/credential-internal';
41-
//import { HttpClient } from '../../../src/utils/api-request';
42-
//import { Agent } from 'https';
4339
import { deepCopy } from '../../../src/utils/deep-copy';
4440

4541
chai.should();
@@ -53,12 +49,6 @@ if (!process.env.HOME) {
5349
throw new Error('$HOME environment variable must be set to run the tests.');
5450
}
5551
const GCLOUD_CREDENTIAL_PATH = path.resolve(process.env.HOME!, '.config', GCLOUD_CREDENTIAL_SUFFIX);
56-
// const MOCK_REFRESH_TOKEN_CONFIG = {
57-
// client_id: 'test_client_id',
58-
// client_secret: 'test_client_secret',
59-
// type: 'authorized_user',
60-
// refresh_token: 'test_token',
61-
// };
6252
const MOCK_IMPERSONATED_TOKEN_CONFIG = {
6353
delegates: [],
6454
service_account_impersonation_url: '',
@@ -71,37 +61,16 @@ const MOCK_IMPERSONATED_TOKEN_CONFIG = {
7161
type: 'impersonated_service_account'
7262
}
7363

74-
//const ONE_HOUR_IN_SECONDS = 60 * 60;
75-
7664
describe('Credential', () => {
7765
let mockCertificateObject: any;
7866
let oldProcessEnv: NodeJS.ProcessEnv;
79-
//let getTokenScope: nock.Scope;
80-
//let mockedRequests: nock.Scope[] = [];
81-
82-
// before(() => {
83-
// getTokenScope = nock('https://accounts.google.com')
84-
// .persist()
85-
// .post('/o/oauth2/token')
86-
// .reply(200, {
87-
// access_token: utils.generateRandomAccessToken(),
88-
// token_type: 'Bearer',
89-
// expires_in: 3600,
90-
// }, {
91-
// 'cache-control': 'no-cache, no-store, max-age=0, must-revalidate',
92-
// });
93-
// });
94-
95-
// after(() => getTokenScope.done());
9667

9768
beforeEach(() => {
9869
mockCertificateObject = _.clone(mocks.certificateObject);
9970
oldProcessEnv = process.env;
10071
});
10172

10273
afterEach(() => {
103-
//_.forEach(mockedRequests, (mockedRequest) => mockedRequest.done());
104-
//mockedRequests = [];
10574
process.env = oldProcessEnv;
10675
});
10776

0 commit comments

Comments
 (0)