mirror of
https://github.com/gohugoio/hugo.git
synced 2024-11-21 20:46:30 -05:00
Simplify some integration tests
This commit is contained in:
parent
d1109f590a
commit
da4866c2be
4 changed files with 8 additions and 22 deletions
|
@ -16,7 +16,6 @@ package babel_test
|
||||||
import (
|
import (
|
||||||
"testing"
|
"testing"
|
||||||
|
|
||||||
qt "github.com/frankban/quicktest"
|
|
||||||
jww "github.com/spf13/jwalterweatherman"
|
jww "github.com/spf13/jwalterweatherman"
|
||||||
|
|
||||||
"github.com/gohugoio/hugo/htesting"
|
"github.com/gohugoio/hugo/htesting"
|
||||||
|
@ -28,8 +27,6 @@ func TestTransformBabel(t *testing.T) {
|
||||||
t.Skip("Skip long running test when running locally")
|
t.Skip("Skip long running test when running locally")
|
||||||
}
|
}
|
||||||
|
|
||||||
c := qt.New(t)
|
|
||||||
|
|
||||||
files := `
|
files := `
|
||||||
-- assets/js/main.js --
|
-- assets/js/main.js --
|
||||||
/* A Car */
|
/* A Car */
|
||||||
|
@ -81,7 +78,7 @@ Transpiled3: {{ $transpiled.Permalink }}
|
||||||
|
|
||||||
b := hugolib.NewIntegrationTestBuilder(
|
b := hugolib.NewIntegrationTestBuilder(
|
||||||
hugolib.IntegrationTestConfig{
|
hugolib.IntegrationTestConfig{
|
||||||
T: c,
|
T: t,
|
||||||
TxtarString: files,
|
TxtarString: files,
|
||||||
NeedsOsFS: true,
|
NeedsOsFS: true,
|
||||||
NeedsNpmInstall: true,
|
NeedsNpmInstall: true,
|
||||||
|
|
|
@ -16,13 +16,11 @@ package templates_test
|
||||||
import (
|
import (
|
||||||
"testing"
|
"testing"
|
||||||
|
|
||||||
qt "github.com/frankban/quicktest"
|
|
||||||
|
|
||||||
"github.com/gohugoio/hugo/hugolib"
|
"github.com/gohugoio/hugo/hugolib"
|
||||||
)
|
)
|
||||||
|
|
||||||
func TestExecuteAsTemplateMultipleLanguages(t *testing.T) {
|
func TestExecuteAsTemplateMultipleLanguages(t *testing.T) {
|
||||||
c := qt.New(t)
|
t.Parallel()
|
||||||
|
|
||||||
files := `
|
files := `
|
||||||
-- config.toml --
|
-- config.toml --
|
||||||
|
@ -63,7 +61,7 @@ LangURL: {{ relLangURL "foo" }}
|
||||||
|
|
||||||
b := hugolib.NewIntegrationTestBuilder(
|
b := hugolib.NewIntegrationTestBuilder(
|
||||||
hugolib.IntegrationTestConfig{
|
hugolib.IntegrationTestConfig{
|
||||||
T: c,
|
T: t,
|
||||||
TxtarString: files,
|
TxtarString: files,
|
||||||
}).Build()
|
}).Build()
|
||||||
|
|
||||||
|
|
|
@ -16,8 +16,6 @@ package dartsass_test
|
||||||
import (
|
import (
|
||||||
"testing"
|
"testing"
|
||||||
|
|
||||||
qt "github.com/frankban/quicktest"
|
|
||||||
|
|
||||||
"github.com/gohugoio/hugo/hugolib"
|
"github.com/gohugoio/hugo/hugolib"
|
||||||
"github.com/gohugoio/hugo/resources/resource_transformers/tocss/dartsass"
|
"github.com/gohugoio/hugo/resources/resource_transformers/tocss/dartsass"
|
||||||
)
|
)
|
||||||
|
@ -27,8 +25,6 @@ func TestTransformIncludePaths(t *testing.T) {
|
||||||
t.Skip()
|
t.Skip()
|
||||||
}
|
}
|
||||||
|
|
||||||
c := qt.New(t)
|
|
||||||
|
|
||||||
files := `
|
files := `
|
||||||
-- assets/scss/main.scss --
|
-- assets/scss/main.scss --
|
||||||
@import "moo";
|
@import "moo";
|
||||||
|
@ -47,7 +43,7 @@ T1: {{ $r.Content }}
|
||||||
|
|
||||||
b := hugolib.NewIntegrationTestBuilder(
|
b := hugolib.NewIntegrationTestBuilder(
|
||||||
hugolib.IntegrationTestConfig{
|
hugolib.IntegrationTestConfig{
|
||||||
T: c,
|
T: t,
|
||||||
TxtarString: files,
|
TxtarString: files,
|
||||||
NeedsOsFS: true,
|
NeedsOsFS: true,
|
||||||
}).Build()
|
}).Build()
|
||||||
|
@ -59,7 +55,6 @@ func TestTransformImportRegularCSS(t *testing.T) {
|
||||||
if !dartsass.Supports() {
|
if !dartsass.Supports() {
|
||||||
t.Skip()
|
t.Skip()
|
||||||
}
|
}
|
||||||
c := qt.New(t)
|
|
||||||
|
|
||||||
files := `
|
files := `
|
||||||
-- assets/scss/_moo.scss --
|
-- assets/scss/_moo.scss --
|
||||||
|
@ -88,7 +83,7 @@ T1: {{ $r.Content | safeHTML }}
|
||||||
|
|
||||||
b := hugolib.NewIntegrationTestBuilder(
|
b := hugolib.NewIntegrationTestBuilder(
|
||||||
hugolib.IntegrationTestConfig{
|
hugolib.IntegrationTestConfig{
|
||||||
T: c,
|
T: t,
|
||||||
TxtarString: files,
|
TxtarString: files,
|
||||||
NeedsOsFS: true,
|
NeedsOsFS: true,
|
||||||
},
|
},
|
||||||
|
@ -114,8 +109,6 @@ func TestTransformThemeOverrides(t *testing.T) {
|
||||||
t.Skip()
|
t.Skip()
|
||||||
}
|
}
|
||||||
|
|
||||||
c := qt.New(t)
|
|
||||||
|
|
||||||
files := `
|
files := `
|
||||||
-- assets/scss/components/_boo.scss --
|
-- assets/scss/components/_boo.scss --
|
||||||
$boolor: green;
|
$boolor: green;
|
||||||
|
@ -163,7 +156,7 @@ zoo {
|
||||||
|
|
||||||
b := hugolib.NewIntegrationTestBuilder(
|
b := hugolib.NewIntegrationTestBuilder(
|
||||||
hugolib.IntegrationTestConfig{
|
hugolib.IntegrationTestConfig{
|
||||||
T: c,
|
T: t,
|
||||||
TxtarString: files,
|
TxtarString: files,
|
||||||
NeedsOsFS: true,
|
NeedsOsFS: true,
|
||||||
},
|
},
|
||||||
|
|
|
@ -18,12 +18,10 @@ import (
|
||||||
"testing"
|
"testing"
|
||||||
|
|
||||||
"github.com/gohugoio/hugo/hugolib"
|
"github.com/gohugoio/hugo/hugolib"
|
||||||
|
|
||||||
qt "github.com/frankban/quicktest"
|
|
||||||
)
|
)
|
||||||
|
|
||||||
func TestUnmarshal(t *testing.T) {
|
func TestUnmarshal(t *testing.T) {
|
||||||
c := qt.New(t)
|
t.Parallel()
|
||||||
|
|
||||||
files := `
|
files := `
|
||||||
-- assets/api/myapi.yaml --
|
-- assets/api/myapi.yaml --
|
||||||
|
@ -60,7 +58,7 @@ API: {{ $api.Info.Title | safeHTML }}
|
||||||
|
|
||||||
b := hugolib.NewIntegrationTestBuilder(
|
b := hugolib.NewIntegrationTestBuilder(
|
||||||
hugolib.IntegrationTestConfig{
|
hugolib.IntegrationTestConfig{
|
||||||
T: c,
|
T: t,
|
||||||
Running: true,
|
Running: true,
|
||||||
TxtarString: files,
|
TxtarString: files,
|
||||||
},
|
},
|
||||||
|
|
Loading…
Reference in a new issue