go-process/errors_test.go
Virgil b74ee080a2 feat(process): add service error helper
Co-Authored-By: Virgil <virgil@lethean.io>
2026-04-04 07:24:12 +00:00

15 lines
335 B
Go

package process
import (
"testing"
"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/require"
)
func TestServiceError(t *testing.T) {
err := ServiceError("service failed", ErrContextRequired)
require.Error(t, err)
assert.Contains(t, err.Error(), "service failed")
assert.ErrorIs(t, err, ErrContextRequired)
}