Skip to content

Commit 666dae8

Browse files
committed
test: update "natural sort" case to include some labelled snapshots
1 parent 89b34a5 commit 666dae8

File tree

1 file changed

+10
-2
lines changed

1 file changed

+10
-2
lines changed

snaps/clean_test.go

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -562,11 +562,15 @@ func TestNaturalSort(t *testing.T) {
562562
t.Run("should sort in descending order", func(t *testing.T) {
563563
items := []string{
564564
"[TestExample/Test_Case_1#74 - 1]",
565+
"[TestExample/Test_Case_2#01 - 1 - b]",
565566
"[TestExample/Test_Case_1#05 - 1]",
566567
"[TestExample/Test_Case_1#09 - 1]",
568+
"[TestExample/Test_Case_2#01 - 2 - a]",
569+
"[TestExample/Test_Case_1#74 - 1 - my label]",
567570
"[TestExample - 1]",
568571
"[TestExample/Test_Case_1#71 - 1]",
569-
"[TestExample/Test_Case_1#100 - 1]",
572+
"[TestExample/Test_Case_2#01 - 3 - c]",
573+
"[TestExample/Test_Case_1#100 - 1 - another label]",
570574
"[TestExample/Test_Case_1#7 - 1]",
571575
}
572576
expected := []string{
@@ -575,8 +579,12 @@ func TestNaturalSort(t *testing.T) {
575579
"[TestExample/Test_Case_1#7 - 1]",
576580
"[TestExample/Test_Case_1#09 - 1]",
577581
"[TestExample/Test_Case_1#71 - 1]",
582+
"[TestExample/Test_Case_1#74 - 1 - my label]",
578583
"[TestExample/Test_Case_1#74 - 1]",
579-
"[TestExample/Test_Case_1#100 - 1]",
584+
"[TestExample/Test_Case_1#100 - 1 - another label]",
585+
"[TestExample/Test_Case_2#01 - 1 - b]",
586+
"[TestExample/Test_Case_2#01 - 2 - a]",
587+
"[TestExample/Test_Case_2#01 - 3 - c]",
580588
}
581589

582590
slices.SortFunc(items, naturalSort)

0 commit comments

Comments
 (0)