helpers_test.go 263 B

123456789101112131415
  1. package oscar
  2. import (
  3. "context"
  4. "github.com/stretchr/testify/mock"
  5. )
  6. // matchContext matches any instance of Context interface.
  7. func matchContext() interface{} {
  8. return mock.MatchedBy(func(ctx any) bool {
  9. _, ok := ctx.(context.Context)
  10. return ok
  11. })
  12. }