Stash bunch of broken generated test with shitty broken mocking
This commit is contained in:
@@ -0,0 +1,26 @@
|
||||
package game
|
||||
|
||||
import (
|
||||
"testing"
|
||||
|
||||
"gitea.boner.be/bdnugget/goonscape/game/mock"
|
||||
"gitea.boner.be/bdnugget/goonscape/game/testutils"
|
||||
)
|
||||
|
||||
func setupTestEnvironment(t *testing.T) (*Game, func()) {
|
||||
testutils.ResetMockInput()
|
||||
testutils.SetupMockFunctions()
|
||||
|
||||
game := New()
|
||||
game.input = &MockInput{}
|
||||
game.Chat.input = &MockInput{} // Also inject mock input into chat
|
||||
|
||||
// Verify mock setup
|
||||
if mock.IsKeyPressed == nil || mock.GetCharPressed == nil {
|
||||
t.Fatal("Mock functions not properly initialized")
|
||||
}
|
||||
|
||||
return game, func() {
|
||||
testutils.ResetMockInput()
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user