summaryrefslogtreecommitdiffstats
path: root/helpers/testhelpers_test.go
diff options
context:
space:
mode:
Diffstat (limited to 'helpers/testhelpers_test.go')
-rw-r--r--helpers/testhelpers_test.go9
1 files changed, 9 insertions, 0 deletions
diff --git a/helpers/testhelpers_test.go b/helpers/testhelpers_test.go
index c9da4f129..b74dccfc4 100644
--- a/helpers/testhelpers_test.go
+++ b/helpers/testhelpers_test.go
@@ -5,6 +5,7 @@ import (
"github.com/gohugoio/hugo/hugofs"
"github.com/gohugoio/hugo/langs"
+ "github.com/gohugoio/hugo/modules"
)
func newTestPathSpec(fs *hugofs.Fs, v *viper.Viper) *PathSpec {
@@ -42,6 +43,14 @@ func newTestCfg() *viper.Viper {
v.Set("resourceDir", "resources")
v.Set("publishDir", "public")
v.Set("archetypeDir", "archetypes")
+ langs.LoadLanguageSettings(v, nil)
+ langs.LoadLanguageSettings(v, nil)
+ mod, err := modules.CreateProjectModule(v)
+ if err != nil {
+ panic(err)
+ }
+ v.Set("allModules", modules.Modules{mod})
+
return v
}