Skip to content

Commit 37ffbd7

Browse files
authored
chore: remove unused project to id mapping from html builder (microsoft#31698)
1 parent 0aa2f06 commit 37ffbd7

File tree

1 file changed

+0
-18
lines changed
  • packages/playwright/src/reporters

1 file changed

+0
-18
lines changed

packages/playwright/src/reporters/html.ts

Lines changed: 0 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -226,8 +226,6 @@ class HtmlBuilder {
226226
private _dataZipFile: ZipFile;
227227
private _hasTraces = false;
228228
private _attachmentsBaseURL: string;
229-
private _projectToId: Map<Suite, number> = new Map();
230-
private _lastProjectId = 0;
231229

232230
constructor(config: FullConfig, outputDir: string, attachmentsBaseURL: string) {
233231
this._config = config;
@@ -406,16 +404,6 @@ class HtmlBuilder {
406404
};
407405
}
408406

409-
private _projectId(suite: Suite): number {
410-
const project = projectSuite(suite);
411-
let id = this._projectToId.get(project);
412-
if (!id) {
413-
id = ++this._lastProjectId;
414-
this._projectToId.set(project, id);
415-
}
416-
return id;
417-
}
418-
419407
private _serializeAttachments(attachments: JsonAttachment[]) {
420408
let lastAttachment: TestAttachment | undefined;
421409
return attachments.map(a => {
@@ -653,10 +641,4 @@ function createSnippets(stepsInFile: MultiMap<string, TestStep>) {
653641
}
654642
}
655643

656-
function projectSuite(suite: Suite): Suite {
657-
while (suite.parent?.parent)
658-
suite = suite.parent;
659-
return suite;
660-
}
661-
662644
export default HtmlReporter;

0 commit comments

Comments
 (0)