mirror of
https://github.com/scratchfoundation/golangci-lint.git
synced 2025-08-12 22:38:46 -04:00
dev: refactor some test assertions (#4081)
This commit is contained in:
parent
615a52b9e3
commit
0704271d8d
11 changed files with 26 additions and 31 deletions
test
|
@ -4,7 +4,7 @@ import (
|
|||
"path/filepath"
|
||||
"testing"
|
||||
|
||||
"github.com/stretchr/testify/assert"
|
||||
"github.com/stretchr/testify/require"
|
||||
_ "github.com/valyala/quicktemplate"
|
||||
|
||||
"github.com/golangci/golangci-lint/pkg/exitcodes"
|
||||
|
@ -536,7 +536,7 @@ func TestEnabledPresetsAreNotDuplicated(t *testing.T) {
|
|||
func TestAbsPathDirAnalysis(t *testing.T) {
|
||||
dir := filepath.Join("testdata_etc", "abspath") // abs paths don't work with testdata dir
|
||||
absDir, err := filepath.Abs(dir)
|
||||
assert.NoError(t, err)
|
||||
require.NoError(t, err)
|
||||
|
||||
testshared.NewRunnerBuilder(t).
|
||||
WithNoConfig().
|
||||
|
@ -555,7 +555,7 @@ func TestAbsPathDirAnalysis(t *testing.T) {
|
|||
func TestAbsPathFileAnalysis(t *testing.T) {
|
||||
dir := filepath.Join("testdata_etc", "abspath", "with_issue.go") // abs paths don't work with testdata dir
|
||||
absDir, err := filepath.Abs(dir)
|
||||
assert.NoError(t, err)
|
||||
require.NoError(t, err)
|
||||
|
||||
testshared.NewRunnerBuilder(t).
|
||||
WithNoConfig().
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue