Using the following code:
function urlSlug(title) {
return title.split(/\s+/).join('-').toLowerCase();
}
The test is returning the following problem:
urlSlug(" Winter Is Coming") should return "winter-is-coming".
But if I run the code in console or in jsbin, it returns the proper result, so it looks to be working?
Is this an actual issue with the unit test provided, or am I somehow bypassing the issue when I test it by hand? Thanks for any assistance!