MCPcopy Index your code
hub / github.com/riverqueue/river / TestJobCancel

Function TestJobCancel

error_test.go:56–70  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

54}
55
56func TestJobCancel(t *testing.T) {
57 t.Parallel()
58
59 t.Run("ErrorsIsReturnsTrueForAnotherErrorOfSameType", func(t *testing.T) {
60 t.Parallel()
61 err1 := river.JobCancel(errors.New("some message"))
62 require.ErrorIs(t, err1, river.JobCancel(errors.New("another message")))
63 })
64
65 t.Run("ErrorsIsReturnsFalseForADifferentErrorType", func(t *testing.T) {
66 t.Parallel()
67 err1 := river.JobCancel(errors.New("some message"))
68 require.NotErrorIs(t, err1, &river.UnknownJobKindError{Kind: "MyJobArgs"})
69 })
70}

Callers

nothing calls this directly

Calls 2

JobCancelFunction · 0.92
RunMethod · 0.65

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…