diff --git a/src/Umbraco.Web.UI.Client/src/packages/core/router/generate-route-path-builder.function.test.ts b/src/Umbraco.Web.UI.Client/src/packages/core/router/generate-route-path-builder.function.test.ts index 6efbf1845f..f6de7d9f86 100644 --- a/src/Umbraco.Web.UI.Client/src/packages/core/router/generate-route-path-builder.function.test.ts +++ b/src/Umbraco.Web.UI.Client/src/packages/core/router/generate-route-path-builder.function.test.ts @@ -29,6 +29,11 @@ describe('createRoutePathBuilder', () => { expect(buildPath({ param1: 'value1' })).to.eq('/test/value1/path/value1/'); }); + it('should not consider parameters that are not in the params object', () => { + const buildPath = createRoutePathBuilder('test/:param1/path/:param2'); + expect(buildPath({ param1: 'value1' })).to.eq('/test/value1/path/:param2/'); + }); + it('should support complex objects as parameters with a custom toString method', () => { const buildPath = createRoutePathBuilder('test/:param1/path/:param2'); const obj = {