Skip to content

Commit

Permalink
Simplify some integration tests
Browse files Browse the repository at this point in the history
  • Loading branch information
bep committed Feb 10, 2022
1 parent d1109f5 commit da4866c
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 22 deletions.
5 changes: 1 addition & 4 deletions resources/resource_transformers/babel/integration_test.go
Expand Up @@ -16,7 +16,6 @@ package babel_test
import (
"testing"

qt "github.com/frankban/quicktest"
jww "github.com/spf13/jwalterweatherman"

"github.com/gohugoio/hugo/htesting"
Expand All @@ -28,8 +27,6 @@ func TestTransformBabel(t *testing.T) {
t.Skip("Skip long running test when running locally")
}

c := qt.New(t)

files := `
-- assets/js/main.js --
/* A Car */
Expand Down Expand Up @@ -81,7 +78,7 @@ Transpiled3: {{ $transpiled.Permalink }}

b := hugolib.NewIntegrationTestBuilder(
hugolib.IntegrationTestConfig{
T: c,
T: t,
TxtarString: files,
NeedsOsFS: true,
NeedsNpmInstall: true,
Expand Down
6 changes: 2 additions & 4 deletions resources/resource_transformers/templates/integration_test.go
Expand Up @@ -16,13 +16,11 @@ package templates_test
import (
"testing"

qt "github.com/frankban/quicktest"

"github.com/gohugoio/hugo/hugolib"
)

func TestExecuteAsTemplateMultipleLanguages(t *testing.T) {
c := qt.New(t)
t.Parallel()

files := `
-- config.toml --
Expand Down Expand Up @@ -63,7 +61,7 @@ LangURL: {{ relLangURL "foo" }}

b := hugolib.NewIntegrationTestBuilder(
hugolib.IntegrationTestConfig{
T: c,
T: t,
TxtarString: files,
}).Build()

Expand Down
13 changes: 3 additions & 10 deletions resources/resource_transformers/tocss/dartsass/integration_test.go
Expand Up @@ -16,8 +16,6 @@ package dartsass_test
import (
"testing"

qt "github.com/frankban/quicktest"

"github.com/gohugoio/hugo/hugolib"
"github.com/gohugoio/hugo/resources/resource_transformers/tocss/dartsass"
)
Expand All @@ -27,8 +25,6 @@ func TestTransformIncludePaths(t *testing.T) {
t.Skip()
}

c := qt.New(t)

files := `
-- assets/scss/main.scss --
@import "moo";
Expand All @@ -47,7 +43,7 @@ T1: {{ $r.Content }}

b := hugolib.NewIntegrationTestBuilder(
hugolib.IntegrationTestConfig{
T: c,
T: t,
TxtarString: files,
NeedsOsFS: true,
}).Build()
Expand All @@ -59,7 +55,6 @@ func TestTransformImportRegularCSS(t *testing.T) {
if !dartsass.Supports() {
t.Skip()
}
c := qt.New(t)

files := `
-- assets/scss/_moo.scss --
Expand Down Expand Up @@ -88,7 +83,7 @@ T1: {{ $r.Content | safeHTML }}

b := hugolib.NewIntegrationTestBuilder(
hugolib.IntegrationTestConfig{
T: c,
T: t,
TxtarString: files,
NeedsOsFS: true,
},
Expand All @@ -114,8 +109,6 @@ func TestTransformThemeOverrides(t *testing.T) {
t.Skip()
}

c := qt.New(t)

files := `
-- assets/scss/components/_boo.scss --
$boolor: green;
Expand Down Expand Up @@ -163,7 +156,7 @@ zoo {

b := hugolib.NewIntegrationTestBuilder(
hugolib.IntegrationTestConfig{
T: c,
T: t,
TxtarString: files,
NeedsOsFS: true,
},
Expand Down
6 changes: 2 additions & 4 deletions tpl/openapi/openapi3/integration_test.go
Expand Up @@ -18,12 +18,10 @@ import (
"testing"

"github.com/gohugoio/hugo/hugolib"

qt "github.com/frankban/quicktest"
)

func TestUnmarshal(t *testing.T) {
c := qt.New(t)
t.Parallel()

files := `
-- assets/api/myapi.yaml --
Expand Down Expand Up @@ -60,7 +58,7 @@ API: {{ $api.Info.Title | safeHTML }}

b := hugolib.NewIntegrationTestBuilder(
hugolib.IntegrationTestConfig{
T: c,
T: t,
Running: true,
TxtarString: files,
},
Expand Down

0 comments on commit da4866c

Please sign in to comment.