github.com/Foodji/aws-lambda-go@v1.20.2/events/test/jsoncompare.go (about)

     1  // Copyright 2017 Amazon.com, Inc. or its affiliates. All Rights Reserved.
     2  
     3  package test
     4  
     5  import (
     6  	"testing"
     7  
     8  	"github.com/stretchr/testify/assert"
     9  )
    10  
    11  // AssertJsonsEqual asserts two JSON files are semantically equal
    12  // (ignores white-space and attribute order)
    13  func AssertJsonsEqual(t *testing.T, expectedJson []byte, actualJson []byte) {
    14  	assert.JSONEq(t, string(expectedJson), string(actualJson))
    15  }