Skip to content

Commit

Permalink
fix: test case
Browse files Browse the repository at this point in the history
  • Loading branch information
sysulq committed Feb 17, 2024
1 parent 37d8009 commit 25ace6d
Showing 1 changed file with 0 additions and 14 deletions.
14 changes: 0 additions & 14 deletions cmd/kod/internal/generate_test.go
Original file line number Diff line number Diff line change
@@ -1,23 +1,9 @@
package internal

import (
"os"
"os/exec"
"testing"
"time"

"github.com/stretchr/testify/assert"
)

func TestGenerate(t *testing.T) {
execute("generate github.com/go-kod/kod/tests/graphcase/...")
}

func TestGenerateWithWatch(t *testing.T) {
execute("generate -w github.com/go-kod/kod/tests/graphcase/... -t 1s")
cmd := exec.Command("sh", "-c", "echo test>test.go")
cmd.Stderr = os.Stderr
cmd.Stdout = os.Stdout
assert.Nil(t, cmd.Run())
time.Sleep(2 * time.Second)
}

0 comments on commit 25ace6d

Please sign in to comment.