aboutsummaryrefslogtreecommitdiffhomepage
path: root/minifiers
diff options
context:
space:
mode:
authorBjørn Erik Pedersen <[email protected]>2019-08-10 21:05:17 +0200
committerBjørn Erik Pedersen <[email protected]>2019-08-12 13:26:32 +0200
commit9e571827055dedb46b78c5db3d17d6913f14870b (patch)
treef5f0108afe0c9385ff6dc27664943d9f719f57ad /minifiers
parent6027ee11082d0b9d72de1d4d1980a702be294ad2 (diff)
downloadhugo-9e571827055dedb46b78c5db3d17d6913f14870b.tar.gz
hugo-9e571827055dedb46b78c5db3d17d6913f14870b.zip
tests: Convert from testify to quicktest
Diffstat (limited to 'minifiers')
-rw-r--r--minifiers/minifiers_test.go14
1 files changed, 7 insertions, 7 deletions
diff --git a/minifiers/minifiers_test.go b/minifiers/minifiers_test.go
index acfa22d2c..d88dab881 100644
--- a/minifiers/minifiers_test.go
+++ b/minifiers/minifiers_test.go
@@ -20,12 +20,12 @@ import (
"github.com/gohugoio/hugo/media"
+ qt "github.com/frankban/quicktest"
"github.com/gohugoio/hugo/output"
- "github.com/stretchr/testify/require"
)
func TestNew(t *testing.T) {
- assert := require.New(t)
+ c := qt.New(t)
m := New(media.DefaultTypes, output.DefaultFormats)
var rawJS string
@@ -66,14 +66,14 @@ func TestNew(t *testing.T) {
} {
var b bytes.Buffer
- assert.NoError(m.Minify(test.tp, &b, strings.NewReader(test.rawString)))
- assert.Equal(test.expectedMinString, b.String())
+ c.Assert(m.Minify(test.tp, &b, strings.NewReader(test.rawString)), qt.IsNil)
+ c.Assert(b.String(), qt.Equals, test.expectedMinString)
}
}
func TestBugs(t *testing.T) {
- assert := require.New(t)
+ c := qt.New(t)
m := New(media.DefaultTypes, output.DefaultFormats)
for _, test := range []struct {
@@ -86,8 +86,8 @@ func TestBugs(t *testing.T) {
} {
var b bytes.Buffer
- assert.NoError(m.Minify(test.tp, &b, strings.NewReader(test.rawString)))
- assert.Equal(test.expectedMinString, b.String())
+ c.Assert(m.Minify(test.tp, &b, strings.NewReader(test.rawString)), qt.IsNil)
+ c.Assert(b.String(), qt.Equals, test.expectedMinString)
}
}