Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/gohugoio/hugo.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBjørn Erik Pedersen <bjorn.erik.pedersen@gmail.com>2022-02-10 21:49:20 +0300
committerBjørn Erik Pedersen <bjorn.erik.pedersen@gmail.com>2022-02-10 22:43:19 +0300
commitda4866c2bebf68a400d6f569440d017245728450 (patch)
tree5db1990ba61f95806d655fc7ec1c7a31daed8d16
parentd1109f590adf78afb3052e9aa3b89d093c08db47 (diff)
Simplify some integration tests
-rw-r--r--resources/resource_transformers/babel/integration_test.go5
-rw-r--r--resources/resource_transformers/templates/integration_test.go6
-rw-r--r--resources/resource_transformers/tocss/dartsass/integration_test.go13
-rw-r--r--tpl/openapi/openapi3/integration_test.go6
4 files changed, 8 insertions, 22 deletions
diff --git a/resources/resource_transformers/babel/integration_test.go b/resources/resource_transformers/babel/integration_test.go
index 3fe3c17b1..164e7fd40 100644
--- a/resources/resource_transformers/babel/integration_test.go
+++ b/resources/resource_transformers/babel/integration_test.go
@@ -16,7 +16,6 @@ package babel_test
import (
"testing"
- qt "github.com/frankban/quicktest"
jww "github.com/spf13/jwalterweatherman"
"github.com/gohugoio/hugo/htesting"
@@ -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 */
@@ -81,7 +78,7 @@ Transpiled3: {{ $transpiled.Permalink }}
b := hugolib.NewIntegrationTestBuilder(
hugolib.IntegrationTestConfig{
- T: c,
+ T: t,
TxtarString: files,
NeedsOsFS: true,
NeedsNpmInstall: true,
diff --git a/resources/resource_transformers/templates/integration_test.go b/resources/resource_transformers/templates/integration_test.go
index 685a9ba30..4eaac8e27 100644
--- a/resources/resource_transformers/templates/integration_test.go
+++ b/resources/resource_transformers/templates/integration_test.go
@@ -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 --
@@ -63,7 +61,7 @@ LangURL: {{ relLangURL "foo" }}
b := hugolib.NewIntegrationTestBuilder(
hugolib.IntegrationTestConfig{
- T: c,
+ T: t,
TxtarString: files,
}).Build()
diff --git a/resources/resource_transformers/tocss/dartsass/integration_test.go b/resources/resource_transformers/tocss/dartsass/integration_test.go
index c1616f684..9434b1d52 100644
--- a/resources/resource_transformers/tocss/dartsass/integration_test.go
+++ b/resources/resource_transformers/tocss/dartsass/integration_test.go
@@ -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"
)
@@ -27,8 +25,6 @@ func TestTransformIncludePaths(t *testing.T) {
t.Skip()
}
- c := qt.New(t)
-
files := `
-- assets/scss/main.scss --
@import "moo";
@@ -47,7 +43,7 @@ T1: {{ $r.Content }}
b := hugolib.NewIntegrationTestBuilder(
hugolib.IntegrationTestConfig{
- T: c,
+ T: t,
TxtarString: files,
NeedsOsFS: true,
}).Build()
@@ -59,7 +55,6 @@ func TestTransformImportRegularCSS(t *testing.T) {
if !dartsass.Supports() {
t.Skip()
}
- c := qt.New(t)
files := `
-- assets/scss/_moo.scss --
@@ -88,7 +83,7 @@ T1: {{ $r.Content | safeHTML }}
b := hugolib.NewIntegrationTestBuilder(
hugolib.IntegrationTestConfig{
- T: c,
+ T: t,
TxtarString: files,
NeedsOsFS: true,
},
@@ -114,8 +109,6 @@ func TestTransformThemeOverrides(t *testing.T) {
t.Skip()
}
- c := qt.New(t)
-
files := `
-- assets/scss/components/_boo.scss --
$boolor: green;
@@ -163,7 +156,7 @@ zoo {
b := hugolib.NewIntegrationTestBuilder(
hugolib.IntegrationTestConfig{
- T: c,
+ T: t,
TxtarString: files,
NeedsOsFS: true,
},
diff --git a/tpl/openapi/openapi3/integration_test.go b/tpl/openapi/openapi3/integration_test.go
index 2b0730154..d3be0eda9 100644
--- a/tpl/openapi/openapi3/integration_test.go
+++ b/tpl/openapi/openapi3/integration_test.go
@@ -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 --
@@ -60,7 +58,7 @@ API: {{ $api.Info.Title | safeHTML }}
b := hugolib.NewIntegrationTestBuilder(
hugolib.IntegrationTestConfig{
- T: c,
+ T: t,
Running: true,
TxtarString: files,
},