mirror of
https://github.com/ddworken/hishtory.git
synced 2025-02-16 18:41:03 +01:00
Make unused golden files into an error
This commit is contained in:
parent
d8eb079e5f
commit
cae6113abc
@ -30,8 +30,8 @@ var UNUSED_GOLDENS []string = []string{"TestTui-Exit", "testControlR-ControlC-ba
|
||||
"TestTui-DefaultColorScheme"}
|
||||
|
||||
func main() {
|
||||
checkGoldensUsed()
|
||||
exportMetrics()
|
||||
checkGoldensUsed()
|
||||
}
|
||||
|
||||
func checkGoldensUsed() {
|
||||
@ -66,7 +66,7 @@ func checkGoldensUsed() {
|
||||
if !slices.Contains(usedGoldens, goldenName) && !slices.Contains(UNUSED_GOLDENS, goldenName) {
|
||||
err = fmt.Errorf("golden file %v was never used", goldenName)
|
||||
fmt.Println(err)
|
||||
// TODO: Add a panic(err) here too
|
||||
log.Fatalf("%v", err)
|
||||
}
|
||||
}
|
||||
fmt.Println("Validated that all goldens in testdata/ were referenced!")
|
||||
|
Loading…
Reference in New Issue
Block a user