File tree 1 file changed +17
-14
lines changed
1 file changed +17
-14
lines changed Original file line number Diff line number Diff line change @@ -156,22 +156,25 @@ func TestAllowMissingFormatter(t *testing.T) {
156
156
},
157
157
})
158
158
159
- // default
160
- treefmt2 (t ,
161
- withError (func (err error ) {
162
- as .ErrorIs (err , format .ErrCommandNotFound )
163
- }),
164
- )
159
+ t .Run ("default" , func (t * testing.T ) {
160
+ treefmt2 (t ,
161
+ withError (func (err error ) {
162
+ as .ErrorIs (err , format .ErrCommandNotFound )
163
+ }),
164
+ )
165
+ })
165
166
166
- // arg
167
- treefmt2 (t ,
168
- withArgs ("--allow-missing-formatter" ),
169
- withNoError (as ),
170
- )
167
+ t .Run ("arg" , func (t * testing.T ) {
168
+ treefmt2 (t ,
169
+ withArgs ("--allow-missing-formatter" ),
170
+ withNoError (as ),
171
+ )
172
+ })
171
173
172
- // env
173
- t .Setenv ("TREEFMT_ALLOW_MISSING_FORMATTER" , "true" )
174
- treefmt2 (t , withNoError (as ))
174
+ t .Run ("env" , func (t * testing.T ) {
175
+ t .Setenv ("TREEFMT_ALLOW_MISSING_FORMATTER" , "true" )
176
+ treefmt2 (t , withNoError (as ))
177
+ })
175
178
}
176
179
177
180
func TestSpecifyingFormatters (t * testing.T ) {
You can’t perform that action at this time.
0 commit comments