Skip to content

Commit 82b740e

Browse files
committed
extra test
1 parent 989781c commit 82b740e

File tree

1 file changed

+15
-0
lines changed

1 file changed

+15
-0
lines changed

src/Umbraco.Web.UI.Client/src/packages/core/router/contexts/route-path-addendum.test.ts

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -119,4 +119,19 @@ describe('UmbRoutepathAddendum', () => {
119119
addendumContext.setAddendum('hello/here');
120120
});
121121
});
122+
123+
it('work with empty string addendum', (done) => {
124+
addendumContext.setAddendum('hello/here');
125+
const innerChild = new UmbTestChildElement();
126+
child.appendChild(innerChild);
127+
const childAddendumContext = new UmbRoutePathAddendumContext(innerChild);
128+
childAddendumContext.setAddendum('');
129+
130+
childAddendumContext.observe(childAddendumContext.addendum, (addendum) => {
131+
if (addendum) {
132+
expect(addendum).to.equal('hello/here');
133+
done();
134+
}
135+
});
136+
});
122137
});

0 commit comments

Comments
 (0)