c782fa4130
* Revise dynamic route generation This implements a new tree-based route sorting algorithm that uses a Depth-First-Traversal approach to correctly sort the routes. This provides better clarity over a `.sort()` based approach and will scale well as we add new features in the future. * Update import
14 lines
265 B
Text
14 lines
265 B
Text
// Jest Snapshot v1, https://goo.gl/fbAQLP
|
|
|
|
exports[`getSortedRoutes correctly sorts required slugs 1`] = `
|
|
Array [
|
|
"/",
|
|
"/apples/$ab/$cd/ef",
|
|
"/blog/$id",
|
|
"/blog/$id/comments/$cid",
|
|
"/foo/$d/bar/baz/$f",
|
|
"/posts",
|
|
"/posts/$id",
|
|
"/$root-slug",
|
|
]
|
|
`;
|