github: Enable NPM tests on Windows

Fixes #8196
This commit is contained in:
Bjørn Erik Pedersen 2021-02-01 10:23:28 +01:00
parent 440fdb0eb9
commit 144943798c
3 changed files with 2 additions and 16 deletions

View file

@ -38,10 +38,6 @@ func TestJSBuildWithNPM(t *testing.T) {
t.Skip("skip (relative) long running modules test when running locally") 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() wd, _ := os.Getwd()
defer func() { defer func() {
os.Chdir(wd) os.Chdir(wd)

View file

@ -17,7 +17,6 @@ import (
"bytes" "bytes"
"os" "os"
"path/filepath" "path/filepath"
"runtime"
"testing" "testing"
"github.com/gohugoio/hugo/common/hexec" "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") 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() wd, _ := os.Getwd()
defer func() { defer func() {
os.Chdir(wd) os.Chdir(wd)

View file

@ -23,7 +23,6 @@ import (
"github.com/gohugoio/hugo/resources/resource_transformers/tocss/dartsass" "github.com/gohugoio/hugo/resources/resource_transformers/tocss/dartsass"
"path/filepath" "path/filepath"
"runtime"
"strings" "strings"
"testing" "testing"
"time" "time"
@ -925,10 +924,6 @@ func TestResourceChainPostCSS(t *testing.T) {
t.Skip("skip (relative) long running modules test when running locally") 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() wd, _ := os.Getwd()
defer func() { defer func() {
os.Chdir(wd) os.Chdir(wd)
@ -1034,8 +1029,8 @@ class-in-b {
// Make sure Node sees this. // Make sure Node sees this.
b.Assert(logBuf.String(), qt.Contains, "Hugo Environment: production") 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, filepath.FromSlash(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("package.json: %s/package.json", workDir)))
b.AssertFileContent("public/index.html", ` b.AssertFileContent("public/index.html", `
Styles RelPermalink: /css/styles.css Styles RelPermalink: /css/styles.css