Skip to content

Commit 53a84e6

Browse files
committed
test: Add TestCreateEslintConfigMultipleNamedParams
1 parent 36db748 commit 53a84e6

File tree

1 file changed

+28
-0
lines changed

1 file changed

+28
-0
lines changed

tools/eslintConfigCreator_test.go

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -88,6 +88,34 @@ func TestCreateEslintConfigNamedParam(t *testing.T) {
8888
];`)
8989
}
9090

91+
func TestCreateEslintConfigMultipleNamedParams(t *testing.T) {
92+
testConfig(t,
93+
ToolConfiguration{
94+
PatternsConfiguration: []PatternConfiguration{
95+
{
96+
PatternId: "consistent-return",
97+
ParamenterConfigurations: []PatternParameterConfiguration{
98+
{
99+
Name: "treatUndefinedAsUnspecified",
100+
Value: "false",
101+
},
102+
{
103+
Name: "treatNullAsUnspecified",
104+
Value: "true",
105+
},
106+
},
107+
},
108+
},
109+
},
110+
`export default [
111+
{
112+
rules: {
113+
"consistent-return": ["error", {"treatUndefinedAsUnspecified": false, "treatNullAsUnspecified": true}],
114+
}
115+
}
116+
];`)
117+
}
118+
91119
func TestCreateEslintConfigUnnamedAndNamedParam(t *testing.T) {
92120
testConfig(t,
93121
ToolConfiguration{

0 commit comments

Comments
 (0)