Small fix to run webapp tests (#7777)

This commit is contained in:
Jesús Espino
2017-11-21 00:53:46 +01:00
committed by Christopher Speller
parent deff850115
commit e2b165cf3e

View File

@@ -131,7 +131,12 @@ func executeTestCommand(cmd *exec.Cmd) {
}
func runWebClientTests() {
os.Chdir("webapp")
if webappDir := os.Getenv("WEBAPP_DIR"); webappDir != "" {
os.Chdir(webappDir)
} else {
os.Chdir("../mattermost-webapp")
}
cmd := exec.Command("npm", "test")
executeTestCommand(cmd)
}