Skip to content

Commit

Permalink
Add test
Browse files Browse the repository at this point in the history
  • Loading branch information
necrophonic committed Oct 29, 2021
1 parent 7d50a86 commit dd3d0c9
Showing 1 changed file with 18 additions and 0 deletions.
18 changes: 18 additions & 0 deletions gopher-maze-2/internal/game/game_test.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
package game_test

import (
"testing"
"time"

"github.com/necrophonic/3d-gopher-maze/gopher-maze-2/internal/game"
"github.com/stretchr/testify/assert"
)

func TestGame(t *testing.T) {
t.Run("Create new game", func(t *testing.T) {
g := game.New()
assert.NotNil(t, g)
assert.Equal(t, 100*time.Millisecond, g.Tick, "default tick 100ms")
assert.NotNil(t, g.Player, "created default player")
})
}

0 comments on commit dd3d0c9

Please sign in to comment.