@@ -24,26 +24,36 @@ const versions = rewire('../../../bin/templates/scripts/cordova/lib/versions');
2424if ( process . platform === 'darwin' ) {
2525 describe ( 'versions' , ( ) => {
2626 describe ( 'get_tool_version method' , ( ) => {
27- it ( 'should not have found tool by name.' , ( ) => versions . get_tool_version ( 'unknown' ) . then (
28- ( ) => fail ( 'expected promise rejection' ) ,
29- error => expect ( error ) . toContain ( 'is not valid tool name' )
30- ) ) ;
31-
32- it ( 'should find xcodebuild version.' , ( ) => versions . get_tool_version ( 'xcodebuild' ) . then ( ( version ) => {
33- expect ( version ) . not . toBe ( undefined ) ;
34- } ) ) ;
35-
36- it ( 'should find ios-sim version.' , ( ) => versions . get_tool_version ( 'ios-sim' ) . then ( ( version ) => {
37- expect ( version ) . not . toBe ( undefined ) ;
38- } ) ) ;
39-
40- it ( 'should find ios-deploy version.' , ( ) => versions . get_tool_version ( 'ios-deploy' ) . then ( ( version ) => {
41- expect ( version ) . not . toBe ( undefined ) ;
42- } ) ) ;
43-
44- it ( 'should find pod version.' , ( ) => versions . get_tool_version ( 'pod' ) . then ( ( version ) => {
45- expect ( version ) . not . toBe ( undefined ) ;
46- } ) ) ;
27+ it ( 'should not have found tool by name.' , ( ) => {
28+ return versions . get_tool_version ( 'unknown' ) . then (
29+ ( ) => fail ( 'expected promise rejection' ) ,
30+ error => expect ( error ) . toContain ( 'is not valid tool name' )
31+ ) ;
32+ } ) ;
33+
34+ it ( 'should find xcodebuild version.' , ( ) => {
35+ return versions . get_tool_version ( 'xcodebuild' ) . then ( ( version ) => {
36+ expect ( version ) . not . toBe ( undefined ) ;
37+ } ) ;
38+ } ) ;
39+
40+ it ( 'should find ios-sim version.' , ( ) => {
41+ return versions . get_tool_version ( 'ios-sim' ) . then ( ( version ) => {
42+ expect ( version ) . not . toBe ( undefined ) ;
43+ } ) ;
44+ } ) ;
45+
46+ it ( 'should find ios-deploy version.' , ( ) => {
47+ return versions . get_tool_version ( 'ios-deploy' ) . then ( ( version ) => {
48+ expect ( version ) . not . toBe ( undefined ) ;
49+ } ) ;
50+ } ) ;
51+
52+ it ( 'should find pod version.' , ( ) => {
53+ return versions . get_tool_version ( 'pod' ) . then ( ( version ) => {
54+ expect ( version ) . not . toBe ( undefined ) ;
55+ } ) ;
56+ } ) ;
4757 } ) ;
4858 } ) ;
4959}
0 commit comments