catberry
Version:
Catberry is an isomorphic framework for building universal front-end apps using components, Flux architecture and progressive rendering.
44 lines • 1.05 kB
JSON
{
"removeEndSlash": [
{
"name": "should remove slash at the end of absolute URI",
"uri": "http:///some/ggg/dsd/",
"expected": "http:///some/ggg/dsd"
},
{
"name": "should remove slash at the end of relative URI",
"uri": "ggg/dsd/",
"expected": "ggg/dsd"
},
{
"name": "should remove slash at the end of URI with hash",
"uri": "http:///some/ggg/dsd/#some",
"expected": "http:///some/ggg/dsd#some"
},
{
"name": "should remove slash at the end of URI with search",
"uri": "http:///some/ggg/dsd/?arg=some",
"expected": "http:///some/ggg/dsd?arg=some"
},
{
"name": "should return empty string if URI is not a string",
"uri": null,
"expected": ""
},
{
"name": "should return URI as is if URI is a root",
"uri": "/",
"expected": "/"
},
{
"name": "should return URI as is if URI is a root with hash",
"uri": "/#hash",
"expected": "/#hash"
},
{
"name": "should return URI as is if URI is a root with search",
"uri": "/?arg=some",
"expected": "/?arg=some"
}
]
}