-
Notifications
You must be signed in to change notification settings - Fork 39
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(betterer ✨): no more weird completed then new tests (#1213)
- Loading branch information
1 parent
94729fd
commit da704f2
Showing
23 changed files
with
695 additions
and
124 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
import type { BettererResult } from '../results/index.js'; | ||
import type { BettererRun, BettererRunSummary } from './types.js'; | ||
|
||
import { BettererRunSummaryΩ } from './run-summary.js'; | ||
|
||
export class BettererRunObsoleteΩ implements BettererRun { | ||
public readonly expected: BettererResult; | ||
public readonly isNew = false; | ||
public readonly isObsolete = true; | ||
public readonly isOnly = false; | ||
public readonly isRemoved: boolean; | ||
public readonly isSkipped = false; | ||
public readonly filePaths = null; | ||
|
||
constructor( | ||
public readonly name: string, | ||
public readonly baseline: BettererResult, | ||
update = false | ||
) { | ||
this.isRemoved = update; | ||
this.expected = baseline; | ||
} | ||
|
||
public async run(): Promise<BettererRunSummary> { | ||
return await Promise.resolve( | ||
new BettererRunSummaryΩ({ | ||
baseline: this.baseline, | ||
delta: null, | ||
diff: null, | ||
error: null, | ||
expected: this.expected, | ||
filePaths: this.filePaths, | ||
isBetter: false, | ||
isComplete: false, | ||
isExpired: false, | ||
isFailed: false, | ||
isNew: false, | ||
isObsolete: this.isObsolete, | ||
isRemoved: this.isRemoved, | ||
isSame: false, | ||
isSkipped: false, | ||
isUpdated: false, | ||
isWorse: false, | ||
name: this.name, | ||
result: null, | ||
timestamp: -Infinity | ||
}) | ||
); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.