16 lines
506 B
TypeScript
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");
|
|
})
|
|
|
|
}); |