Tests for paging up to find old messages (#11650)

* Use longer numbers for many() messages to avoid substring clashes

* Tests for paging up
This commit is contained in:
Andy Balaam 2023-09-29 09:26:47 +01:00 committed by GitHub
parent 6af4335db1
commit 506f286a3e
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 245 additions and 17 deletions

View file

@ -372,7 +372,7 @@ export function pageUp() {
* @param howMany the number of strings to generate
*/
export function many(prefix: string, howMany: number): Array<string> {
return Array.from(Array(howMany).keys()).map((i) => prefix + i.toFixed());
return Array.from(Array(howMany).keys()).map((i) => prefix + i.toString().padStart(4, "0"));
}
/**