Skip to content

Commit dd3d0c9

Browse files
committed
Add test
1 parent 7d50a86 commit dd3d0c9

File tree

1 file changed

+18
-0
lines changed

1 file changed

+18
-0
lines changed
+18
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
package game_test
2+
3+
import (
4+
"testing"
5+
"time"
6+
7+
"github.com/necrophonic/3d-gopher-maze/gopher-maze-2/internal/game"
8+
"github.com/stretchr/testify/assert"
9+
)
10+
11+
func TestGame(t *testing.T) {
12+
t.Run("Create new game", func(t *testing.T) {
13+
g := game.New()
14+
assert.NotNil(t, g)
15+
assert.Equal(t, 100*time.Millisecond, g.Tick, "default tick 100ms")
16+
assert.NotNil(t, g.Player, "created default player")
17+
})
18+
}

0 commit comments

Comments
 (0)