mirror of
https://github.com/vector-im/element-web.git
synced 2026-04-29 09:21:36 +02:00
Merge pull request #248 from element-hq/t3chguy/missing-return
This commit is contained in:
commit
ee404f098b
@ -56,11 +56,7 @@ class StaleScreenshotReporter implements Reporter {
|
||||
this.success = false;
|
||||
}
|
||||
|
||||
public async onExit(): Promise<void> {
|
||||
if (this.failing.size) {
|
||||
console.error(`${this.failing.size} tests failed, skipping stale screenshot reporter.`);
|
||||
}
|
||||
|
||||
private async checkStaleScreenshots(): Promise<void> {
|
||||
if (!this.snapshotRoots.size) {
|
||||
this.error("No snapshot directories found, did you set the snapshotDir in your Playwright config?", "");
|
||||
return;
|
||||
@ -90,6 +86,14 @@ class StaleScreenshotReporter implements Reporter {
|
||||
this.error("Stale screenshot file", screenshot);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public async onExit(): Promise<void> {
|
||||
if (this.failing.size) {
|
||||
this.error(`${this.failing.size} tests failed, skipping stale screenshot reporter.`, "");
|
||||
} else {
|
||||
await this.checkStaleScreenshots();
|
||||
}
|
||||
|
||||
if (!this.success) {
|
||||
process.exit(1);
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user