Skip to content

Commit

Permalink
sass ENV - gocov
Browse files Browse the repository at this point in the history
  • Loading branch information
hunterlong committed Aug 16, 2018
1 parent 4ab4b1f commit ef9c1a9
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 7 deletions.
7 changes: 4 additions & 3 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
6 changes: 3 additions & 3 deletions cmd/cli_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand All @@ -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) {
Expand Down
2 changes: 1 addition & 1 deletion source/source.go
Original file line number Diff line number Diff line change
Expand Up @@ -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")
Expand Down

0 comments on commit ef9c1a9

Please sign in to comment.