summaryrefslogtreecommitdiffstats
path: root/minifiers/minifiers_test.go
diff options
context:
space:
mode:
authorBjørn Erik Pedersen <bjorn.erik.pedersen@gmail.com>2020-09-16 19:41:43 +0200
committerBjørn Erik Pedersen <bjorn.erik.pedersen@gmail.com>2020-09-19 21:17:02 +0200
commitb254532b52785954c98a473a635b9cea016d8565 (patch)
treec22fa7e40311c6b75e45320a53136b2b4720e881 /minifiers/minifiers_test.go
parent05a22892921bd4618efe6135ce0d6fe2be545607 (diff)
deps: Update to github.com/tdewolff/minify v2.9.4
Diffstat (limited to 'minifiers/minifiers_test.go')
-rw-r--r--minifiers/minifiers_test.go25
1 files changed, 24 insertions, 1 deletions
diff --git a/minifiers/minifiers_test.go b/minifiers/minifiers_test.go
index fb222fd6d..cbd2f40ac 100644
--- a/minifiers/minifiers_test.go
+++ b/minifiers/minifiers_test.go
@@ -34,7 +34,7 @@ func TestNew(t *testing.T) {
var rawJS string
var minJS string
rawJS = " var foo =1 ; foo ++ ; "
- minJS = "var foo=1;foo++;"
+ minJS = "var foo=1;foo++"
var rawJSON string
var minJSON string
@@ -168,3 +168,26 @@ 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 := viper.New()
+ v.Set("minify", map[string]interface{}{
+ "disablexml": true,
+ "tdewolff": map[string]interface{}{
+ "css": map[string]interface{}{
+ "decimal": 3,
+ },
+ "svg": map[string]interface{}{
+ "decimal": 3,
+ },
+ },
+ })
+
+ conf, err := decodeConfig(v)
+
+ c.Assert(err, qt.IsNil)
+ c.Assert(conf.Tdewolff.CSS.Precision, qt.Equals, 3)
+
+}