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-03-21 11:35:15 +0300
committerBjørn Erik Pedersen <bjorn.erik.pedersen@gmail.com>2022-04-08 14:26:17 +0300
commitd070bdf10f14d233288f7318a4e9f7555f070a65 (patch)
treefff8d59f98bdab3027bb45c4e10ca88594332872 /minifiers
parentb08193971a821fc27e549a73120c15e5e5186775 (diff)
Rework the Destination filesystem to make --renderStaticToDisk work
See #9626
Diffstat (limited to 'minifiers')
-rw-r--r--minifiers/config_test.go7
-rw-r--r--minifiers/minifiers_test.go12
2 files changed, 9 insertions, 10 deletions
diff --git a/minifiers/config_test.go b/minifiers/config_test.go
index e932fe856..57f2e5659 100644
--- a/minifiers/config_test.go
+++ b/minifiers/config_test.go
@@ -16,14 +16,13 @@ package minifiers
import (
"testing"
- "github.com/gohugoio/hugo/config"
-
qt "github.com/frankban/quicktest"
+ "github.com/gohugoio/hugo/config"
)
func TestConfig(t *testing.T) {
c := qt.New(t)
- v := config.New()
+ v := config.NewWithTestDefaults()
v.Set("minify", map[string]any{
"disablexml": true,
@@ -53,7 +52,7 @@ func TestConfig(t *testing.T) {
func TestConfigLegacy(t *testing.T) {
c := qt.New(t)
- v := config.New()
+ v := config.NewWithTestDefaults()
// This was a bool < Hugo v0.58.
v.Set("minify", true)
diff --git a/minifiers/minifiers_test.go b/minifiers/minifiers_test.go
index ce429c98a..687983310 100644
--- a/minifiers/minifiers_test.go
+++ b/minifiers/minifiers_test.go
@@ -28,7 +28,7 @@ import (
func TestNew(t *testing.T) {
c := qt.New(t)
- v := config.New()
+ v := config.NewWithTestDefaults()
m, _ := New(media.DefaultTypes, output.DefaultFormats, v)
var rawJS string
@@ -76,7 +76,7 @@ func TestNew(t *testing.T) {
func TestConfigureMinify(t *testing.T) {
c := qt.New(t)
- v := config.New()
+ v := config.NewWithTestDefaults()
v.Set("minify", map[string]any{
"disablexml": true,
"tdewolff": map[string]any{
@@ -110,7 +110,7 @@ func TestConfigureMinify(t *testing.T) {
func TestJSONRoundTrip(t *testing.T) {
c := qt.New(t)
- v := config.New()
+ v := config.NewWithTestDefaults()
m, _ := New(media.DefaultTypes, output.DefaultFormats, v)
for _, test := range []string{`{
@@ -148,7 +148,7 @@ func TestJSONRoundTrip(t *testing.T) {
func TestBugs(t *testing.T) {
c := qt.New(t)
- v := config.New()
+ v := config.NewWithTestDefaults()
m, _ := New(media.DefaultTypes, output.DefaultFormats, v)
for _, test := range []struct {
@@ -171,7 +171,7 @@ func TestBugs(t *testing.T) {
// Renamed to Precision in v2.7.0. Check that we support both.
func TestDecodeConfigDecimalIsNowPrecision(t *testing.T) {
c := qt.New(t)
- v := config.New()
+ v := config.NewWithTestDefaults()
v.Set("minify", map[string]any{
"disablexml": true,
"tdewolff": map[string]any{
@@ -194,7 +194,7 @@ func TestDecodeConfigDecimalIsNowPrecision(t *testing.T) {
// Issue 9456
func TestDecodeConfigKeepWhitespace(t *testing.T) {
c := qt.New(t)
- v := config.New()
+ v := config.NewWithTestDefaults()
v.Set("minify", map[string]any{
"tdewolff": map[string]any{
"html": map[string]any{