File tree Expand file tree Collapse file tree 7 files changed +58
-30
lines changed Expand file tree Collapse file tree 7 files changed +58
-30
lines changed Original file line number Diff line number Diff line change
1
+ ## 0.0.22
2
+ - fixed support of multiple services
3
+
1
4
## 0.0.21
2
5
- added capability handle cucumber result in services
3
6
Original file line number Diff line number Diff line change 1
1
{
2
2
"name" : " @qavajs/cli" ,
3
- "version" : " 0.0.21 " ,
3
+ "version" : " 0.0.22 " ,
4
4
"description" : " cli for qavajs framework" ,
5
5
"scripts" : {
6
6
"build" : " tsc" ,
28
28
"ejs" : " ^3.1.9" ,
29
29
"fs-extra" : " ^11.1.1" ,
30
30
"inquirer" : " ^8.2.5" ,
31
- "yargs" : " ^17.7.1 " ,
31
+ "yargs" : " ^17.7.2 " ,
32
32
"yarn-install" : " ^1.0.0"
33
33
},
34
34
"devDependencies" : {
35
- "@cucumber/cucumber" : " ^9.1.0 " ,
35
+ "@cucumber/cucumber" : " ^9.1.1 " ,
36
36
"@qavajs/memory" : " ^1.2.1" ,
37
37
"@types/chai" : " ^4.3.4" ,
38
38
"@types/ejs" : " ^3.1.2" ,
Original file line number Diff line number Diff line change 1
1
import path from 'path' ;
2
2
import importConfig from './importConfig' ;
3
- import { IRunResult } from '@cucumber/cucumber/api' ;
3
+ import { IRunResult } from '@cucumber/cucumber/api' ;
4
4
5
5
export default class ServiceHandler {
6
6
private config : Promise < Config > ;
@@ -42,13 +42,17 @@ export default class ServiceHandler {
42
42
43
43
async before ( ) {
44
44
for ( const svc of await this . services ) {
45
- if ( svc . before ) return svc . before ( ) ;
45
+ if ( svc . before ) {
46
+ await svc . before ( ) ;
47
+ }
46
48
}
47
49
}
48
50
49
51
async after ( result : IRunResult ) {
50
52
for ( const svc of await this . services ) {
51
- if ( svc . after ) return svc . after ( result ) ;
53
+ if ( svc . after ) {
54
+ await svc . after ( result ) ;
55
+ }
52
56
}
53
57
}
54
58
}
Original file line number Diff line number Diff line change @@ -11,6 +11,13 @@ module.exports = {
11
11
parallel : 1 ,
12
12
publishQuiet : true ,
13
13
service : [ {
14
+ before ( ) {
15
+ console . log ( 'service 1 started' ) ;
16
+ } ,
17
+ } , {
18
+ before ( ) {
19
+ console . log ( 'service 2 started' ) ;
20
+ } ,
14
21
after ( result ) {
15
22
console . log ( result . success ) ;
16
23
}
Original file line number Diff line number Diff line change @@ -10,6 +10,13 @@ export default {
10
10
parallel : 1 ,
11
11
publishQuiet : true ,
12
12
service : [ {
13
+ before ( ) {
14
+ console . log ( 'service 1 started' ) ;
15
+ } ,
16
+ } , {
17
+ before ( ) {
18
+ console . log ( 'service 2 started' ) ;
19
+ } ,
13
20
after ( result ) {
14
21
console . log ( result . success ) ;
15
22
}
Original file line number Diff line number Diff line change @@ -11,6 +11,13 @@ export default {
11
11
parallel : 1 ,
12
12
publishQuiet : true ,
13
13
service : [ {
14
+ before ( ) {
15
+ console . log ( 'service 1 started' ) ;
16
+ } ,
17
+ } , {
18
+ before ( ) {
19
+ console . log ( 'service 2 started' ) ;
20
+ } ,
14
21
after ( result : IRunResult ) {
15
22
console . log ( result . success ) ;
16
23
}
You can’t perform that action at this time.
0 commit comments