mirror of
https://github.com/morluto/rea.git
synced 2026-11-12 01:41:21 +00:00
fix(javascript): bound query unions and refresh semantic fixtures
This commit is contained in:
1 parent
07005b8fe6
commit
6323013d83
7 files changed
+282
-64
No files matched your search
@@ -81,9 +81,35 @@ it("coalesces exact patterns while retaining independent occurrences and stable
|
||||
"/reports/settings",
|
||||
]);
|
||||
expect(result.routes[0]).toMatchObject({
|
||||
occurrence_count: 3,
|
||||
occurrence_count: 2,
|
||||
source_count: 2,
|
||||
});
|
||||
const reportOccurrences = result.occurrences.filter(
|
||||
({ route_id }) => route_id === result.routes[0]!.id,
|
||||
);
|
||||
expect(
|
||||
reportOccurrences
|
||||
.map(({ source_id, mechanism, segments }) => ({
|
||||
source: result.sources.find(({ id }) => id === source_id)?.key,
|
||||
mechanism,
|
||||
segments: segments.map(({ value }) => value),
|
||||
}))
|
||||
.sort((left, right) => left.source!.localeCompare(right.source!)),
|
||||
).toEqual([
|
||||
{
|
||||
source: "one.js",
|
||||
mechanism: "navigation-target",
|
||||
segments: ["/reports"],
|
||||
},
|
||||
{
|
||||
source: "two.js",
|
||||
mechanism: "nested-route-object",
|
||||
segments: ["/reports"],
|
||||
},
|
||||
]);
|
||||
expect(new Set(result.occurrences.map(({ id }) => id)).size).toBe(
|
||||
result.occurrences.length,
|
||||
);
|
||||
expect(result.routes.map(({ id }) => id)).toEqual(
|
||||
repeated.routes.map(({ id }) => id),
|
||||
);
|
||||
|
||||
Reference in new issue
Block a user