Open pepelsbey opened 10 years ago
I like the idea. Luckily someone who is involved wrote a lovely little library called URI.js, maybe we can use it here. Looking at you @rodneyrehm
well, not sure how many comparison utiliies you'd want to expose here. I can think of too many things you want to test for (is it the proper filename? does the query string have the property Y? is it value X? does the URL in the fragment equal something… bla bla bla).
The OP concentrates on .assert.url
- but really this applies to other things as well, e.g. .attr('a', 'href')
. So we'd probably want to extend the chai imports or something?
Right now it's possible to check the whole URL only which is less readable and doesn't work in unpredictable or static environment. It would be great to see more flexible URL matching.
My suggestions
When I pass relative URL like
folder/index.html
it becomesfile:///Users/…/folder/index.html
.New
relative()
method could match URL relative to folder where dalek is launchedNew methogs could match specific URL parts
There are more URL parts that could be checked (domain levels, etc.), but I think these are essential.