Replace stretchr/testify with an internal test suite (#981)

As recommended, an `internal/assert` package was added with a reduced set of assertions. All tests were then refactored to use the internal assertions. When more complex assertions were used, they have been rewritten using logic and the simplified assertions.

Fancy formatting for failures was omitted. The `internal/assert/assertions.diff` function could be overwritten for better formatting. That is where diff libraries are used in other test suites.

Refs: #872

Co-authored-by: Alex Mikitik <alex.mikitik@oracle.com>
This commit is contained in:
Alex Mikitik
2025-04-07 03:36:37 -07:00
committed by GitHub
parent 923b2ab478
commit 014204cfb7
22 changed files with 681 additions and 352 deletions
+1 -1
View File
@@ -7,8 +7,8 @@ import (
"strings"
"testing"
"github.com/pelletier/go-toml/v2/internal/assert"
"github.com/pelletier/go-toml/v2/unstable"
"github.com/stretchr/testify/assert"
)
//nolint:funlen