github: Enable NPM tests on Windows
authorBjørn Erik Pedersen <bjorn.erik.pedersen@gmail.com>
Mon, 1 Feb 2021 09:23:28 +0000 (10:23 +0100)
committerBjørn Erik Pedersen <bjorn.erik.pedersen@gmail.com>
Mon, 1 Feb 2021 10:32:17 +0000 (11:32 +0100)
Fixes #8196

hugolib/js_test.go
hugolib/resource_chain_babel_test.go
hugolib/resource_chain_test.go

index 4bb8bf1778b7feabf1cb0b5c90319696b4e4780b..cd0883fd5e6213476ad0669dc2ba799f8fcbb39f 100644 (file)
@@ -38,10 +38,6 @@ func TestJSBuildWithNPM(t *testing.T) {
                t.Skip("skip (relative) long running modules test when running locally")
        }
 
-       if runtime.GOOS == "windows" {
-               t.Skip("skip NPM test on Windows")
-       }
-
        wd, _ := os.Getwd()
        defer func() {
                os.Chdir(wd)
index 77c81f9cae2e2df423990c4778468874ee0f6497..61b2ef6d5531a5391b45a2164acc4d181bad46c7 100644 (file)
@@ -17,7 +17,6 @@ import (
        "bytes"
        "os"
        "path/filepath"
-       "runtime"
        "testing"
 
        "github.com/gohugoio/hugo/common/hexec"
@@ -40,10 +39,6 @@ func TestResourceChainBabel(t *testing.T) {
                t.Skip("skip (relative) long running modules test when running locally")
        }
 
-       if runtime.GOOS == "windows" {
-               t.Skip("skip npm test on Windows")
-       }
-
        wd, _ := os.Getwd()
        defer func() {
                os.Chdir(wd)
index 3a1f1850568f33180a31bf5fa7a4e4d9e10f7222..d9b09e2a904c7dd27e8587d8f3cae536a6a84601 100644 (file)
@@ -23,7 +23,6 @@ import (
        "github.com/gohugoio/hugo/resources/resource_transformers/tocss/dartsass"
 
        "path/filepath"
-       "runtime"
        "strings"
        "testing"
        "time"
@@ -925,10 +924,6 @@ func TestResourceChainPostCSS(t *testing.T) {
                t.Skip("skip (relative) long running modules test when running locally")
        }
 
-       if runtime.GOOS == "windows" {
-               t.Skip("skip npm test on Windows")
-       }
-
        wd, _ := os.Getwd()
        defer func() {
                os.Chdir(wd)
@@ -1034,8 +1029,8 @@ class-in-b {
 
        // Make sure Node sees this.
        b.Assert(logBuf.String(), qt.Contains, "Hugo Environment: production")
-       b.Assert(logBuf.String(), qt.Contains, fmt.Sprintf("PostCSS Config File: %s/postcss.config.js", workDir))
-       b.Assert(logBuf.String(), qt.Contains, fmt.Sprintf("package.json: %s/package.json", workDir))
+       b.Assert(logBuf.String(), qt.Contains, filepath.FromSlash(fmt.Sprintf("PostCSS Config File: %s/postcss.config.js", workDir)))
+       b.Assert(logBuf.String(), qt.Contains, filepath.FromSlash(fmt.Sprintf("package.json: %s/package.json", workDir)))
 
        b.AssertFileContent("public/index.html", `
 Styles RelPermalink: /css/styles.css