Files
monorepo/LCU.WebApps.Collections.RepoClient/src/shared/formatting/UrlFormatting.test.ts
T
2026-03-17 11:09:46 -05:00

16 lines
506 B
TypeScript

import UrlFormatting from "./UrlFormatting";
describe('URL Formatting Class', () => {
it ('Replace URL Params', () => {
const replacedURL = UrlFormatting.ReplaceURLParams(
"http://www.test.com/foo/{fooId}/bar/{barId}/bool/{boolId}",
{ key: 'fooId', value: 1 },
{ key: 'barId', value: 'string' },
{ key: 'boolId', value: false },
);
expect(replacedURL).toEqual("http://www.test.com/foo/1/bar/string/bool/false");
})
});