Fix lints & format

This commit is contained in:
Andras Schmelczer 2026-05-09 15:28:43 +01:00
parent 6d40097bcd
commit 792f57dc7e
36 changed files with 342 additions and 1687 deletions

View file

@ -106,22 +106,6 @@ export class AssertableState {
return this;
}
public assertSubstringCount(
path: string,
substring: string,
expected: number
): this {
this.assertFileExists(path);
const content = this.files.get(path) ?? "";
const actual = content.split(substring).length - 1;
if (actual !== expected) {
throw new Error(
`Expected "${substring}" to appear ${expected} time(s) in "${path}", found ${actual}. Content: "${content}"`
);
}
return this;
}
public assertContentInAtMostOneFile(substring: string): this {
const matches = Array.from(this.files.entries()).filter(([, content]) =>
content.includes(substring)
@ -143,8 +127,4 @@ export class AssertableState {
}
return this;
}
public getContent(path: string): string {
return this.files.get(path) ?? "";
}
}