You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
assert.EqualError(t, err, "no demux handlers provided")
64
+
assert.Nil(t, cfg)
65
+
}
66
+
67
+
funcTestConfigFailsOnBadHandler(t*testing.T) {
68
+
externalCfg:=&Cfg{
69
+
Handlers: []any{
70
+
func(ctx context.Context, eventerror) (
71
+
*events.APIGatewayProxyResponse,
72
+
error) {
73
+
returnnil, nil
74
+
},
75
+
},
76
+
Factories: []Factory{
77
+
func(ctx*EventContext) any {
78
+
returnnil
79
+
},
80
+
},
81
+
}
82
+
83
+
cfg, err:=newDemuxCfg(externalCfg)
84
+
assert.EqualError(
85
+
t,
86
+
err,
87
+
"lambda demux handler function: expected second argument of handler function to be pointer to event struct; got func(context.Context, error) (*events.APIGatewayProxyResponse, error)")
0 commit comments