Skip to content

Commit

Permalink
fix: 🧪 add failing test
Browse files Browse the repository at this point in the history
  • Loading branch information
jbleduigou committed Apr 3, 2024
1 parent c6cfde7 commit cc45c1e
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions handler.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,10 @@ import (
"context"
"log/slog"
"os"
"testing"

"github.com/aws/aws-lambda-go/lambdacontext"
"github.com/stretchr/testify/assert"
)

type LambdaHandler struct {
Expand Down Expand Up @@ -51,3 +53,11 @@ func getLogLevel() slog.Leveler {

return l
}

func TestUsingNonAwsContextShouldNotError(t *testing.T) {
ctx := context.Background()

h := NewAWSLambdaHandler(ctx, nil)

assert.NotNil(t, h)
}

0 comments on commit cc45c1e

Please sign in to comment.