Added replacement option for path

This commit is contained in:
Prabhu Marappan
2021-06-06 16:51:53 +05:30
parent 1ec800cde7
commit 32b76d0970
2 changed files with 7 additions and 1 deletions

View File

@@ -28,4 +28,9 @@ describe('normalizePath', () => {
});
expect(subject).toThrow();
});
it('uses urlPathReplacement when passed to transform the path', () => {
expect(normalizePath({url: '/a/12345'}, {urlPathReplacement: ':id'}))
.toBe('/a/:id');
});
});