You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hello,
Not sure if I'm simply misunderstanding the following.
The text reads:
type SpyStore struct {
response string
cancelled bool
t *testing.T
}
func (s *SpyStore) assertWasCancelled() {
s.t.Helper()
if !s.cancelled {
s.t.Error("store was not told to cancel")
}
}
func (s *SpyStore) assertWasNotCancelled() {
s.t.Helper()
if s.cancelled {
s.t.Error("store was told to cancel")
}
}
Should the Errors be reversed? In the text, it seems like it is saying "if not cancelled, throw an error because the store was not told to cancel". Is it intended to say: "if not cancelled, throw an error because the store was told to cancel"?
type SpyStore struct {
response string
cancelled bool
t *testing.T
}
func (s *SpyStore) assertWasCancelled() {
s.t.Helper()
if !s.cancelled {
s.t.Error("store was told to cancel")
}
}
func (s *SpyStore) assertWasNotCancelled() {
s.t.Helper()
if s.cancelled {
s.t.Error("store was not told to cancel")
}
}
Thanks for your time
The text was updated successfully, but these errors were encountered:
Hello,
Not sure if I'm simply misunderstanding the following.
The text reads:
Should the Errors be reversed? In the text, it seems like it is saying "if not cancelled, throw an error because the store was not told to cancel". Is it intended to say: "if not cancelled, throw an error because the store was told to cancel"?
Thanks for your time
The text was updated successfully, but these errors were encountered: