(t *testing.T)
| 125 | } |
| 126 | |
| 127 | func Test_addStableSince(t *testing.T) { |
| 128 | t.Parallel() |
| 129 | |
| 130 | date := time.Date(2024, time.April, 23, 0, 0, 0, 0, time.UTC) |
| 131 | body := "## Changelog" |
| 132 | |
| 133 | want := "> ## Stable (since April 23, 2024)\n\n## Changelog" |
| 134 | got := addStableSince(date, body) |
| 135 | |
| 136 | if diff := cmp.Diff(want, got); diff != "" { |
| 137 | require.Fail(t, "addStableSince() mismatch (-want +got):\n%s", diff) |
| 138 | } |
| 139 | |
| 140 | // Test that it doesn't add twice. |
| 141 | got = addStableSince(date, got) |
| 142 | |
| 143 | if diff := cmp.Diff(want, got); diff != "" { |
| 144 | require.Fail(t, "addStableSince() mismatch (-want +got):\n%s", diff, "addStableSince() should not add twice") |
| 145 | } |
| 146 | } |
| 147 | |
| 148 | func Test_release_autoversion(t *testing.T) { |
| 149 | t.Parallel() |
nothing calls this directly
no test coverage detected