Skip to content

Feature implementation from commits b534400..c519b79#1

Open
yashuatla wants to merge 16 commits intofeature-base-1from
feature-head-1
Open

Feature implementation from commits b534400..c519b79#1
yashuatla wants to merge 16 commits intofeature-base-1from
feature-head-1

Conversation

@yashuatla
Copy link
Owner

This PR contains changes from a range of commits from the original repository.

Commit Range: b534400..c519b79
Files Changed: 11 (9 programming files)
Programming Ratio: 81.8%

Commits included:

ccoVeille and others added 16 commits May 22, 2025 18:51
Only the tests are updated, code is unchanged.

Previously, the tests were checking only the result of the asserter.
Using captureTestingT helper allows to check the error message
Add Helper() method to CollectT like testing.T as we intend to add
Helper() to the assert.TestingT interface.
…ests

Add Helper() method in internal mocks and assert.CollectT
Co-authored-by: Olivier Mengué <dolmen@cpan.org>
Shortcut in assert.JSONEq once we have validated that 'expected' is
valid JSON, and 'actual' is the exact same string.
Shortcut in assert.YAMLEq once we have validated that 'expected' is
valid YAML, and 'actual' is the exact same string.
Add t.Parallel() to all package-level tests of the 'mock' package.
Result: faster tests results.

Before:
  $ go test -count=10 ./mock
  ok  	github.com/stretchr/testify/mock	0.631s
After:
  $ go test -count=10 ./mock
  ok  	github.com/stretchr/testify/mock	0.426s
…esting

mock: enable parallel testing on internal testsuite
Cleanup runtime use of stdlib's testing internals which was required for older
Go versions.

Note: we are still using testing.RunTests in the suite's test suite for
now.
…f-testing-internals

suite: cleanup use of 'testing' internals at runtime
…mpty-notempty

assert: check test failure message for Empty and NotEmpty
$ go mod edit -dropexclude=github.com/stretchr/testify@v1.8.0 -exclude=github.com/stretchr/testify@v1.8.4
$ go mod tidy

See stretchr/objx#140
deps: fix dependency cycle with objx (again)
Document the assert.Empty rules more comprehensively. This exposes our
quirks to the user to avoid wrong expectations.

Add many many many more test cases that document edges cases and will allow
to catch breaking changes and avoid regressions.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants