Adding
This commit is contained in:
@@ -0,0 +1,16 @@
|
||||
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");
|
||||
})
|
||||
|
||||
});
|
||||
Reference in New Issue
Block a user