Skip to content

Commit f99dc65

Browse files
committed
Use type throughout
1 parent 2133f3c commit f99dc65

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

packages/tracing-internal/test/browser/request.test.ts

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -394,9 +394,14 @@ describe('callbacks', () => {
394394
});
395395
});
396396

397+
interface ProtocolInfo {
398+
name: string;
399+
version: string;
400+
}
401+
397402
describe('HTTPTimings', () => {
398403
describe('Extracting version from ALPN protocol', () => {
399-
const nextHopToNetworkVersion = {
404+
const nextHopToNetworkVersion: Record<string, ProtocolInfo> = {
400405
'http/0.9': { name: 'http', version: '0.9' },
401406
'http/1.0': { name: 'http', version: '1.0' },
402407
'http/1.1': { name: 'http', version: '1.1' },
@@ -434,7 +439,7 @@ describe('HTTPTimings', () => {
434439

435440
const protocols = Object.keys(nextHopToNetworkVersion);
436441
for (const protocol of protocols) {
437-
const expected: { name: string; version: string } = nextHopToNetworkVersion[protocol];
442+
const expected: ProtocolInfo = nextHopToNetworkVersion[protocol];
438443
expect(extractNetworkProtocol(protocol)).toMatchObject(expected);
439444
}
440445
});

0 commit comments

Comments
 (0)