Skip to content

Commit

Permalink
Merge pull request #144 from microsoft/bugfix/local-date-tests
Browse files Browse the repository at this point in the history
fix: a flaky unit tests that depended on machine local settings
  • Loading branch information
baywet authored Aug 13, 2024
2 parents 3c22849 + 17fae92 commit 28b99ec
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions json_parse_node_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -234,13 +234,13 @@ func TestParsingTime(t *testing.T) {
assert.Nil(t, err)
time1, err := someProp.GetTimeValue()
assert.Nil(t, err)
assert.Contains(t, time1.String(), "2023-07-12 08:54:24 +")
assert.Equal(t, "2023-07-12 08:54:24", time1.Format("2006-01-02 15:04:05"))

someProp2, err := parseNode.GetChildNode("withZone")
assert.Nil(t, err)
time2, err := someProp2.GetTimeValue()
assert.Nil(t, err)
assert.Contains(t, time2.String(), "2023-07-12 09:54:24 +")
assert.Equal(t, "2023-07-12 09:54:24", time2.Format("2006-01-02 15:04:05"))
}

func TestThrowErrorOfPrimitiveType(t *testing.T) {
Expand Down

0 comments on commit 28b99ec

Please sign in to comment.