alecthomas / alecthomas/assert

fail to equal time.Time

Open
#9 1 comment 1 reaction 0 assignees View on GitHub
Dominant language
Go
Stars
195
Forks
16
PR merge metrics
No merged PRs in 30d

Description

Given two times that are equal using their [`.Equal()`](https://pkg.go.dev/time#Time.Equal) method, they fail using `assert.Equal()`.

## Proposed solution

Instead of using `reflect.DeepEqual()`, first check if we are asserting times, and then use their [`.Equal()`](https://pkg.go.dev/time#Time.Equal) method.

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.