mirror of
https://github.com/morluto/rea.git
synced 2026-10-26 17:35:11 +00:00
test(release): type patched history options before runtime setup
This commit is contained in:
1 parent
df5c48ffda
commit
18451e4797
1 file changed
+21
-3
@@ -373,12 +373,30 @@ it.each([false, true])(
|
||||
const full = [];
|
||||
for await (const commit of fixture.github.mergeCommitIterator("main"))
|
||||
full.push(commit);
|
||||
const omitted = [];
|
||||
for await (const commit of fixture.github.mergeCommitIterator("main", {
|
||||
expect(fixture.pages.length).toBeGreaterThan(0);
|
||||
expect(fixture.pages.every((page) => page.includeFiles === true)).toBe(
|
||||
true,
|
||||
);
|
||||
const fullPageCount = fixture.pages.length;
|
||||
// The runtime patch adds this option after source checks read upstream types.
|
||||
const options = {
|
||||
includeFiles: false,
|
||||
backfillFiles: true,
|
||||
}))
|
||||
} satisfies NonNullable<
|
||||
Parameters<typeof fixture.github.mergeCommitIterator>[1]
|
||||
> & { includeFiles: boolean };
|
||||
const omitted = [];
|
||||
for await (const commit of fixture.github.mergeCommitIterator(
|
||||
"main",
|
||||
options,
|
||||
))
|
||||
omitted.push(commit);
|
||||
expect(fixture.pages.length).toBeGreaterThan(fullPageCount);
|
||||
expect(
|
||||
fixture.pages
|
||||
.slice(fullPageCount)
|
||||
.every((page) => page.includeFiles === false),
|
||||
).toBe(true);
|
||||
expect(full[0]?.pullRequest?.number).toBe(rebased ? 7 : 42);
|
||||
expect(omitted).toEqual(
|
||||
full.map(({ files: _files, pullRequest, ...commit }) => ({
|
||||
|
||||
Reference in new issue
Block a user