Skip to content

Commit 73d1d04

Browse files
committed
next try
1 parent 592aba4 commit 73d1d04

File tree

1 file changed

+8
-6
lines changed

1 file changed

+8
-6
lines changed

packages/kit/src/core/sync/create_manifest_data/index.spec.js

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -330,19 +330,21 @@ test('optional parameters', () => {
330330
assert.equal(
331331
nodes
332332
.map(simplify_node)
333-
// for some reason linux and windows have a different order
334-
.sort(),
333+
// for some reason linux and windows have a different order, which is why
334+
// we need sort the nodes using a sort function (doesn't work either without),
335+
// resulting in the following expected node order
336+
.sort((a, b) => a.component?.localeCompare(b.component ?? '') ?? 1),
335337
[
336-
default_layout,
337338
default_error,
339+
default_layout,
338340
{
339-
component: 'samples/optional/nested/[[optional]]/sub/+page.svelte'
341+
component: 'samples/optional/[[optional]]/+page.svelte'
340342
},
341343
{
342-
component: 'samples/optional/prefix[[suffix]]/+page.svelte'
344+
component: 'samples/optional/nested/[[optional]]/sub/+page.svelte'
343345
},
344346
{
345-
component: 'samples/optional/[[optional]]/+page.svelte'
347+
component: 'samples/optional/prefix[[suffix]]/+page.svelte'
346348
}
347349
]
348350
);

0 commit comments

Comments
 (0)