Skip to content

Commit e2f4b8f

Browse files
authored
chore: resolve TODO in test (#259)
1 parent 6527b13 commit e2f4b8f

1 file changed

Lines changed: 11 additions & 15 deletions

File tree

handwritten/logging-bunyan/test/middleware/test-express.ts

Lines changed: 11 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -15,12 +15,9 @@
1515
*/
1616

1717
import * as assert from 'assert';
18+
import {GCPEnv} from 'google-auth-library';
1819
import * as proxyquire from 'proxyquire';
1920

20-
// FIXME(ofrobots): use a proper export once the following is released:
21-
// https://github.com/googleapis/google-auth-library-nodejs/pull/569.
22-
import envDetect = require('google-auth-library/build/src/auth/envDetect');
23-
2421
// types-only import. Actual require is done through proxyquire below.
2522
import {MiddlewareOptions} from '../../src/middleware/express';
2623

@@ -116,15 +113,14 @@ describe('middleware/express', () => {
116113
assert.strictEqual(passedProjectId, FAKE_PROJECT_ID);
117114
});
118115

119-
[envDetect.GCPEnv.APP_ENGINE, envDetect.GCPEnv.CLOUD_FUNCTIONS].forEach(
120-
env => {
121-
it(`should not generate the request logger on ${env}`, async () => {
122-
authEnvironment = env;
123-
await middleware();
124-
assert.ok(passedOptions);
125-
assert.strictEqual(passedOptions.length, 1);
126-
// emitRequestLog parameter to makeChildLogger should be undefined.
127-
assert.strictEqual(passedEmitRequestLog, undefined);
128-
});
129-
});
116+
[GCPEnv.APP_ENGINE, GCPEnv.CLOUD_FUNCTIONS].forEach(env => {
117+
it(`should not generate the request logger on ${env}`, async () => {
118+
authEnvironment = env;
119+
await middleware();
120+
assert.ok(passedOptions);
121+
assert.strictEqual(passedOptions.length, 1);
122+
// emitRequestLog parameter to makeChildLogger should be undefined.
123+
assert.strictEqual(passedEmitRequestLog, undefined);
124+
});
125+
});
130126
});

0 commit comments

Comments
 (0)