MCPcopy Index your code
hub / github.com/aws/aws-lambda-go / TestInvalidJsonInput

Function TestInvalidJsonInput

lambda/handler_test.go:456–460  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

454}
455
456func TestInvalidJsonInput(t *testing.T) {
457 lambdaHandler := NewHandler(func(s string) error { return nil })
458 _, err := lambdaHandler.Invoke(context.TODO(), []byte(`{"invalid json`))
459 assert.Equal(t, "unexpected EOF", err.Error())
460}
461
462func TestHandlerTrace(t *testing.T) {
463 handler := NewHandler(func(ctx context.Context, x int) (int, error) {

Callers

nothing calls this directly

Calls 3

InvokeMethod · 0.95
NewHandlerFunction · 0.85
ErrorMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…