mirror of
https://github.com/Hopiu/jquery-mobile.git
synced 2026-05-13 00:53:10 +00:00
added unit tests for path.isRelative. Test coverage for $.mobile.path is now complete!
This commit is contained in:
parent
3484c401c2
commit
6a1cbc0953
1 changed files with 7 additions and 0 deletions
|
|
@ -87,6 +87,13 @@
|
|||
same( $.mobile.path.hasProtocol( "foo/bar/baz.html" ), false, "simple directory path has no protocol" );
|
||||
same( $.mobile.path.hasProtocol( "file://foo/bar/baz.html" ), true, "simple directory path with file:// has protocol" );
|
||||
});
|
||||
|
||||
test( "path.isRelative is working properly", function(){
|
||||
same( $.mobile.path.isRelative("#foo/bar"), false, "path starting with a # is not relative" );
|
||||
same( $.mobile.path.isRelative("/foo/bar"), false, "path starting with a / is not relative" );
|
||||
same( $.mobile.path.isRelative("http://example.com/foo"), false, "full url path is not relative" );
|
||||
same( $.mobile.path.isRelative("foo/bar.html"), true, "simple path is relative" );
|
||||
});
|
||||
|
||||
test( "path.isExternal is working properly", function(){
|
||||
same( $.mobile.path.isExternal( location.href ), false, "same domain is not external" );
|
||||
|
|
|
|||
Loading…
Reference in a new issue