node-tdd
Version:
Drop in extension for mocha to abstract commonly used test setups
15 lines (13 loc) • 332 B
JavaScript
import normalizeUrl from 'normalize-url';
export default (firstUrl, secondUrl) => {
if (firstUrl === secondUrl) {
return true;
}
const options = {
removeTrailingSlash: false
};
return (
normalizeUrl(`https://test.com${firstUrl}`, options)
=== normalizeUrl(`https://test.com${secondUrl}`, options)
);
};