MCPcopy Create free account
hub / github.com/imgproxy/imgproxy / runTestCases

Method runTestCases

clientfeatures/detector_test.go:33–47  ·  view source on GitHub ↗
(testCases []detectorTestCase)

Source from the content-addressed store, hash-verified

31}
32
33func (s *ClientFeaturesDetectorSuite) runTestCases(testCases []detectorTestCase) {
34 for _, tc := range testCases {
35 s.Run(tc.name, func() {
36 detector := clientfeatures.NewDetector(&tc.config)
37
38 header := make(http.Header)
39 for k, v := range tc.header {
40 header.Set(k, v)
41 }
42
43 features := detector.Features(header)
44 s.Require().Equal(tc.expected, features)
45 })
46 }
47}
48
49func (s *ClientFeaturesDetectorSuite) TestFeaturesAutoFormats() {
50 s.runTestCases([]detectorTestCase{

Calls 4

FeaturesMethod · 0.95
NewDetectorFunction · 0.92
RunMethod · 0.80
SetMethod · 0.45

Tested by

no test coverage detected