@@ -23,6 +23,7 @@ test("building config with required inputs only", async () => {
23
23
expect ( config [ i ] . event_type_suffix ) . toEqual (
24
24
commandDefaults . event_type_suffix
25
25
) ;
26
+ expect ( config [ i ] . named_args ) . toEqual ( commandDefaults . named_args ) ;
26
27
}
27
28
} ) ;
28
29
@@ -33,7 +34,8 @@ test("building config with optional inputs", async () => {
33
34
issueType : "pull-request" ,
34
35
allowEdits : true ,
35
36
repository : "owner/repo" ,
36
- eventTypeSuffix : "-cmd"
37
+ eventTypeSuffix : "-cmd" ,
38
+ namedArgs : true
37
39
} ;
38
40
const commands = inputs . commands . replace ( / \s + / g, "" ) . split ( "," ) ;
39
41
const config = getCommandsConfigFromInputs ( inputs ) ;
@@ -45,6 +47,7 @@ test("building config with optional inputs", async () => {
45
47
expect ( config [ i ] . allow_edits ) . toEqual ( inputs . allowEdits ) ;
46
48
expect ( config [ i ] . repository ) . toEqual ( inputs . repository ) ;
47
49
expect ( config [ i ] . event_type_suffix ) . toEqual ( inputs . eventTypeSuffix ) ;
50
+ expect ( config [ i ] . named_args ) . toEqual ( inputs . namedArgs ) ;
48
51
}
49
52
} ) ;
50
53
@@ -69,6 +72,7 @@ test("building config with required JSON only", async () => {
69
72
expect ( config [ i ] . event_type_suffix ) . toEqual (
70
73
commandDefaults . event_type_suffix
71
74
) ;
75
+ expect ( config [ i ] . named_args ) . toEqual ( commandDefaults . named_args ) ;
72
76
}
73
77
} ) ;
74
78
@@ -80,7 +84,8 @@ test("building config with optional JSON properties", async () => {
80
84
"issue_type": "pull-request",
81
85
"allow_edits": true,
82
86
"repository": "owner/repo",
83
- "event_type_suffix": "-cmd"
87
+ "event_type_suffix": "-cmd",
88
+ "named_args": true
84
89
},
85
90
{
86
91
"command": "test-all-the-things",
@@ -96,6 +101,7 @@ test("building config with optional JSON properties", async () => {
96
101
expect ( config [ 0 ] . allow_edits ) . toBeTruthy ( ) ;
97
102
expect ( config [ 0 ] . repository ) . toEqual ( "owner/repo" ) ;
98
103
expect ( config [ 0 ] . event_type_suffix ) . toEqual ( "-cmd" ) ;
104
+ expect ( config [ 0 ] . named_args ) . toBeTruthy ( ) ;
99
105
expect ( config [ 1 ] . command ) . toEqual ( commands [ 1 ] ) ;
100
106
expect ( config [ 1 ] . permission ) . toEqual ( "read" ) ;
101
107
expect ( config [ 1 ] . issue_type ) . toEqual ( commandDefaults . issue_type ) ;
0 commit comments