Small fix to run webapp tests (#7777)

This commit is contained in:
Jesús Espino
2017-11-20 15:53:46 -08:00
committed by Christopher Speller
parent deff850115
commit e2b165cf3e
+6 -1
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)
}