File tree Expand file tree Collapse file tree 1 file changed +7
-4
lines changed Expand file tree Collapse file tree 1 file changed +7
-4
lines changed Original file line number Diff line number Diff line change @@ -7,13 +7,16 @@ const libUrls = require('../');
77const SPEC_FILE = path . join ( __dirname , '../tests.yml' ) ;
88
99suite ( 'basic test' , function ( ) {
10+
1011 var doc = yaml . safeLoad ( fs . readFileSync ( SPEC_FILE , { encoding : 'utf8' } ) ) ;
11- for ( let test of doc [ 'tests' ] ) {
12- for ( let argSet of test [ 'argSets' ] ) {
12+ for ( let t of doc [ 'tests' ] ) {
13+ for ( let argSet of t [ 'argSets' ] ) {
1314 for ( let cluster of Object . keys ( doc [ 'rootURLs' ] ) ) {
1415 for ( let rootURL of doc [ 'rootURLs' ] [ cluster ] ) {
15- assert . equal ( test [ 'expected' ] [ cluster ] , libUrls . withRootUrl ( rootURL ) [ test [ 'function' ] ] ( ...argSet ) ) ;
16- assert . equal ( test [ 'expected' ] [ cluster ] , libUrls [ test [ 'function' ] ] ( rootURL , ...argSet ) ) ;
16+ test ( `${ t [ 'function' ] } - ${ argSet } ` , function ( ) {
17+ assert . equal ( t [ 'expected' ] [ cluster ] , libUrls . withRootUrl ( rootURL ) [ t [ 'function' ] ] ( ...argSet ) ) ;
18+ assert . equal ( t [ 'expected' ] [ cluster ] , libUrls [ t [ 'function' ] ] ( rootURL , ...argSet ) ) ;
19+ } ) ;
1720 }
1821 }
1922 }
You can’t perform that action at this time.
0 commit comments