sass ENV - gocov

pull/41/head^2
Hunter Long 2018-08-15 18:15:14 -07:00
parent 4ab4b1f5c0
commit ef9c1a911c
3 changed files with 8 additions and 7 deletions

View File

@ -34,10 +34,11 @@ compile:
cd source && $(GOPATH)/bin/rice embed-go
$(GOPATH)/bin/wt compile source/scss/base.scss -b source/css
test: clean compile test-env
gocov test -v ./... -p 1 -ldflags="-X main.VERSION=$(VERSION)" -covermode=count > coverage.json
test: clean compile
go test -v ./... -p 1 -ldflags="-X main.VERSION=$(VERSION)" -coverprofile=coverage.out
gocov convert coverage.out > coverage.json
test-all: compile test-env databases
test-all: compile databases
$(GOTEST) ./... -p 1 -ldflags="-X main.VERSION=$(VERSION)" -coverprofile=coverage.out -v
coverage:

View File

@ -47,8 +47,8 @@ func TestVersionCLI(t *testing.T) {
func TestAssetsCLI(t *testing.T) {
run := CatchCLI([]string{"statup", "assets"})
assert.Nil(t, run)
assert.FileExists(t, "../assets/css/base.css")
assert.FileExists(t, "../assets/scss/base.scss")
assert.FileExists(t, dir+"/assets/css/base.css")
assert.FileExists(t, dir+"/assets/scss/base.scss")
}
func TestSassCLI(t *testing.T) {
@ -57,7 +57,7 @@ func TestSassCLI(t *testing.T) {
}
run := CatchCLI([]string{"statup", "sass"})
assert.Nil(t, run)
assert.FileExists(t, "../assets/css/base.css")
assert.FileExists(t, dir+"/assets/css/base.css")
}
func TestUpdateCLI(t *testing.T) {

View File

@ -31,7 +31,7 @@ func Assets() {
func CompileSASS(folder string) error {
sassBin := os.Getenv("SASS")
if sassBin == "" {
return errors.New("missing the SASS executable environment variable")
sassBin = "sass"
}
scssFile := fmt.Sprintf("%v/%v", folder, "assets/scss/base.scss")