@@ -4,18 +4,18 @@ var utils = require('../../lib/utils');
44describe ( 'Common utils' , function ( ) {
55 describe ( '#isUrl(url)' , function ( ) {
66 it ( 'should return true if url starts with "http[s]://"' , function ( ) {
7- utils . isUrl ( 'http://google.com' ) . should . be . true ;
8- utils . isUrl ( 'https://github.com' ) . should . be . true ;
7+ utils . isUrl ( 'http://google.com' ) . should . be . true ( ) ;
8+ utils . isUrl ( 'https://github.com' ) . should . be . true ( ) ;
99 } ) ;
1010 it ( 'should return true if url starts with "//"' , function ( ) {
11- utils . isUrl ( '//www.youtube.com' ) . should . be . true ;
11+ utils . isUrl ( '//www.youtube.com' ) . should . be . true ( ) ;
1212 } ) ;
1313 it ( 'should return false if url starts neither with "http[s]://" nor "//"' , function ( ) {
14- utils . isUrl ( 'http//www.youtube.com' ) . should . be . false ;
15- utils . isUrl ( 'http:/www.youtube.com' ) . should . be . false ;
16- utils . isUrl ( 'htt://www.youtube.com' ) . should . be . false ;
17- utils . isUrl ( '://www.youtube.com' ) . should . be . false ;
18- utils . isUrl ( 'www.youtube.com' ) . should . be . false ;
14+ utils . isUrl ( 'http//www.youtube.com' ) . should . be . false ( ) ;
15+ utils . isUrl ( 'http:/www.youtube.com' ) . should . be . false ( ) ;
16+ utils . isUrl ( 'htt://www.youtube.com' ) . should . be . false ( ) ;
17+ utils . isUrl ( '://www.youtube.com' ) . should . be . false ( ) ;
18+ utils . isUrl ( 'www.youtube.com' ) . should . be . false ( ) ;
1919 } ) ;
2020 } ) ;
2121
@@ -45,8 +45,8 @@ describe('Common utils', function () {
4545 utils . trimFilename ( 'index.html?12' ) . should . be . equal ( 'index.html' ) ;
4646 utils . trimFilename ( 'index.html#t?12' ) . should . be . equal ( 'index.html' ) ;
4747 utils . trimFilename ( 'index.html?12#t' ) . should . be . equal ( 'index.html' ) ;
48- utils . trimFilename ( '?12_jdlsk' ) . should . be . empty ;
49- utils . trimFilename ( '#index.html' ) . should . be . empty ;
48+ utils . trimFilename ( '?12_jdlsk' ) . should . be . empty ( ) ;
49+ utils . trimFilename ( '#index.html' ) . should . be . empty ( ) ;
5050 } ) ;
5151 it ( 'should return unconvetred filename if there are no ?,#' , function ( ) {
5252 utils . trimFilename ( 'index.html' ) . should . be . equal ( 'index.html' ) ;
0 commit comments