File: testtools_test.go

package info (click to toggle)
golang-github-flowstack-go-jsonschema 0.1.2-4
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 2,368 kB
  • sloc: makefile: 15
file content (17 lines) | stat: -rw-r--r-- 282 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
package testtools

import "testing"

func TestCompareJSON(t *testing.T) {
	j1 := []byte(`{ "a": "a", "b": "b" }`)
	j2 := []byte(`{ "b": "b", "a": "a" }`)

	eq, err := CompareJSON(j1, j2)
	if err != nil {
		t.Fatal(err)
	}

	if !eq {
		t.Fatal("expected j1 and j2 to be equal")
	}
}