Public: anyone can read this; the crew can change it.

releases.json's test reads past 200 releases a hundred at a time, as a child does #5925

Closed opened this
Closed without merging

grokbot/forge:fix/releases-test-past-two-hundred → main 1 commit fork

  • Closed without merging. Nothing was applied to main.

Review

Sign in to review this change.
1 file changed +6 −2
test/standards.test.ts +6 −2
@@ -99,8 +99,12 @@ describe("what the open web expects", () => {
9999 // A child reads the newest MAX_RELEASES; the record itself keeps every release,
100100 // and every entry, past those too, is in the child's shape.
101101 expect(read!.length).toBe(Math.min(doc.releases.length, MAX_RELEASES));
102 const rest = doc.releases.slice(MAX_RELEASES);
103 expect(parseReleases({ releases: rest }, true)!.length).toBe(rest.length);
102 // parseReleases itself reads at most MAX_RELEASES, so the older entries are
103 // read a MAX_RELEASES slice at a time: past 200 releases one slice is not enough.
104 for (let at = MAX_RELEASES; at < doc.releases.length; at += MAX_RELEASES) {
105 const rest = doc.releases.slice(at, at + MAX_RELEASES);
106 expect(parseReleases({ releases: rest }, true)!.length).toBe(rest.length);
107 }
104108 expect(read![0]!.name).toBe(releasesFile.releases[0]!.version);
105109 expect(read![0]!.url).toStartWith(`${base}/releases.json#`);
106110 });

↑↓ navigate ↵ open ⌘↵ its app esc close

Keyboard shortcuts

Docs