File tree 1 file changed +38
-0
lines changed
e2e/spring-shell-e2e-tests/test
1 file changed +38
-0
lines changed Original file line number Diff line number Diff line change @@ -47,6 +47,20 @@ describe('builtin commands', () => {
47
47
await expect ( cli . exitCode ( ) ) . resolves . toBe ( 0 ) ;
48
48
} ;
49
49
50
+ /**
51
+ * test for command help succeed
52
+ */
53
+ const helpReturnsInfoDesc = 'command help returns info' ;
54
+ const helpCommand = [ 'help' ] ;
55
+ const helpReturnsInfo = async ( cli : Cli ) => {
56
+ cli . run ( ) ;
57
+ await waitForExpect ( async ( ) => {
58
+ const screen = cli . screen ( ) ;
59
+ expect ( screen ) . toEqual ( expect . arrayContaining ( [ expect . stringContaining ( 'AVAILABLE COMMANDS' ) ] ) ) ;
60
+ } ) ;
61
+ await expect ( cli . exitCode ( ) ) . resolves . toBe ( 0 ) ;
62
+ } ;
63
+
50
64
beforeEach ( async ( ) => {
51
65
waitForExpect . defaults . timeout = waitForExpectDefaultTimeout ;
52
66
waitForExpect . defaults . interval = waitForExpectDefaultInterval ;
@@ -88,6 +102,18 @@ describe('builtin commands', () => {
88
102
} ,
89
103
testTimeout
90
104
) ;
105
+
106
+ it (
107
+ helpReturnsInfoDesc ,
108
+ async ( ) => {
109
+ cli = new Cli ( {
110
+ command : command ,
111
+ options : [ ...options , ...helpCommand ]
112
+ } ) ;
113
+ await helpReturnsInfo ( cli ) ;
114
+ } ,
115
+ testTimeout
116
+ ) ;
91
117
} ) ;
92
118
93
119
/**
@@ -122,5 +148,17 @@ describe('builtin commands', () => {
122
148
} ,
123
149
testTimeout
124
150
) ;
151
+
152
+ it (
153
+ helpReturnsInfoDesc ,
154
+ async ( ) => {
155
+ cli = new Cli ( {
156
+ command : command ,
157
+ options : [ ...options , ...helpCommand ]
158
+ } ) ;
159
+ await helpReturnsInfo ( cli ) ;
160
+ } ,
161
+ testTimeout
162
+ ) ;
125
163
} ) ;
126
164
} ) ;
You can’t perform that action at this time.
0 commit comments