@@ -33,33 +33,52 @@ describe('.travis.yml parsing', () => {
3333 fixture . cleanup ( ) ;
3434 } ) ;
3535
36- describe ( 'simple' , ( ) => {
36+ for ( const yml of [ 'simple-single-object ' , 'simple-single-string' , 'simple-array-object' , 'simple-array-string' ] ) {
3737
38- for ( const yml of [ 'simple-single-object' , 'simple-single-string' , 'simple-array-object' , 'simple-array-string' ] ) {
38+ // eslint-disable-next-line no-loop-func
39+ it ( `resolves simple local import (${ yml } )` , async ( ) => {
3940
40- // eslint-disable-next-line no-loop-func
41- it ( `resolves simple local import (${ yml } )` , async ( ) => {
42-
43- await fixture . setupRepoFolder ( {
44- partials : true ,
45- travisYml : `testing-imports/${ yml } .yml`
46- } ) ;
41+ await fixture . setupRepoFolder ( {
42+ partials : true ,
43+ travisYml : `testing-imports/${ yml } .yml`
44+ } ) ;
4745
48- const result = await NodeSupport . detect ( { path : fixture . path } ) ;
46+ const result = await NodeSupport . detect ( { path : fixture . path } ) ;
4947
50- internals . assertCommit ( result ) ;
48+ internals . assertCommit ( result ) ;
5149
52- expect ( result ) . to . equal ( {
53- name : 'test-module' ,
54- version : '0.0.0-development' ,
55- timestamp : 1580673602000 ,
56- travis : {
57- raw : [ '14' ] ,
58- resolved : { '14' : '14.3.0' }
59- }
60- } ) ;
50+ expect ( result ) . to . equal ( {
51+ name : 'test-module' ,
52+ version : '0.0.0-development' ,
53+ timestamp : 1580673602000 ,
54+ travis : {
55+ raw : [ '14' ] ,
56+ resolved : { '14' : '14.3.0' }
57+ }
6158 } ) ;
62- }
59+ } ) ;
60+ }
61+
62+ it ( 'resolves indirect imports' , async ( ) => {
63+
64+ await fixture . setupRepoFolder ( {
65+ partials : true ,
66+ travisYml : `testing-imports/indirect.yml`
67+ } ) ;
68+
69+ const result = await NodeSupport . detect ( { path : fixture . path } ) ;
70+
71+ internals . assertCommit ( result ) ;
72+
73+ expect ( result ) . to . equal ( {
74+ name : 'test-module' ,
75+ version : '0.0.0-development' ,
76+ timestamp : 1580673602000 ,
77+ travis : {
78+ raw : [ '14' ] ,
79+ resolved : { '14' : '14.3.0' }
80+ }
81+ } ) ;
6382 } ) ;
6483
6584} ) ;
0 commit comments