Gut icon indicating copy to clipboard operation
Gut copied to clipboard

Godot 4 Yield To Fix

Open Tim-Fronsee opened this issue 2 years ago • 0 comments

Summary

Fixes yielding (awaiting) for signals in Gut in Godot 4.

For testing, I used a simple GutTest which emits a button press (below);

func test_pressed():
	var button = autofree(SomeButton.new())
	add_child(button)
	await yield_to(button, "pressed", 1).timeout
        button.emit_signal("pressed")
	assert_signal_emitted(button, "pressed")

Tim-Fronsee avatar Sep 10 '22 05:09 Tim-Fronsee