AutoworkTest๏ƒ

Experimental: Some methods may not be implemented and may be changed in future versions.

Inherits: Node < Object

Test base class for the built-in unit testing framework.

Description๏ƒ

The AutoworkTest class is the base class for defining unit tests in the Autowork framework.

Tests are typically implemented by extending this class and defining test methods that contain assertions.

The framework automatically discovers and executes these methods based on naming conventions and configuration rules provided by AutoworkCollector and AutoworkConfig.

Tutorials๏ƒ

Methods๏ƒ

void

_after_all() virtual

void

_after_each() virtual

void

_before_all() virtual

void

_before_each() virtual

Node

add_child_autofree(child: Node)

Node

add_child_autoqfree(child: Node)

bool

assert_accessors(object: Object, property: StringName, default: Variant, set_to: Variant)

bool

assert_almost_eq(got: Variant, expected: Variant, error_margin: Variant, text: String = "")

bool

assert_almost_ne(got: Variant, expected: Variant, error_margin: Variant, text: String = "")

bool

assert_between(got: Variant, expect_low: Variant, expect_high: Variant, text: String = "")

bool

assert_called(object: Object, method: StringName, args: Array = [], text: String = "")

bool

assert_called_count(object: Object, method: StringName, expected_count: int, args: Array = [], text: String = "")

bool

assert_connected(source: Object, target: Object, signal: StringName, method_name: StringName = "")

bool

assert_dir_does_not_exist(dir_path: String, text: String = "")

bool

assert_dir_exists(dir_path: String, text: String = "")

bool

assert_does_not_have(variant: Variant, element: Variant, text: String = "")

bool

assert_eq(got: Variant, expected: Variant, text: String = "")

bool

assert_eq_deep(got: Variant, expected: Variant, text: String = "")

bool

assert_exports(object: Object, property: StringName, type: Variant.Type)

bool

assert_false(condition: bool, text: String = "")

bool

assert_file_does_not_exist(file_path: String, text: String = "")

bool

assert_file_empty(file_path: String, text: String = "")

bool

assert_file_exists(file_path: String, text: String = "")

bool

assert_file_not_empty(file_path: String, text: String = "")

bool

assert_freed(object: Object, text: String = "")

bool

assert_ge(got: Variant, expected: Variant, text: String = "")

bool

assert_gt(got: Variant, expected: Variant, text: String = "")

bool

assert_gte(got: Variant, expected: Variant, text: String = "")

bool

assert_has(variant: Variant, element: Variant, text: String = "")

bool

assert_has_method(object: Object, method: StringName, text: String = "")

bool

assert_has_signal(object: Object, signal: StringName, message: String = "")

bool

assert_is(object: Object, class: String, text: String = "")

bool

assert_le(got: Variant, expected: Variant, text: String = "")

bool

assert_lt(got: Variant, expected: Variant, text: String = "")

bool

assert_lte(got: Variant, expected: Variant, text: String = "")

bool

assert_ne(got: Variant, expected: Variant, text: String = "")

bool

assert_ne_deep(got: Variant, expected: Variant, text: String = "")

bool

assert_no_new_orphans(message: String = "")

bool

assert_not_between(got: Variant, expect_low: Variant, expect_high: Variant, text: String = "")

bool

assert_not_called(object: Object, method: StringName, args: Array = [], text: String = "")

bool

assert_not_connected(source: Object, target: Object, signal: StringName, method_name: StringName = "")

bool

assert_not_freed(object: Object, text: String = "")

bool

assert_not_null(got: Variant, text: String = "")

bool

assert_not_same(got: Variant, expected: Variant, text: String = "")

bool

assert_not_typeof(variant: Variant, type: Variant.Type, text: String = "")

bool

assert_null(got: Variant, text: String = "")

bool

assert_property(object: Object, property: String, default: Variant, set_to: Variant)

bool

assert_property_with_backing_variable(object: Object, property: String, default_value: Variant, new_value: Variant, backed_by_name: String = "")

bool

assert_readonly_property(object: Object, property: String, new_value: Variant, expected: Variant, text: String = "")

bool

assert_same(got: Variant, expected: Variant, text: String = "")

bool

assert_set_property(object: Object, property: String, new_value: Variant, expected: Variant, text: String = "")

bool

assert_signal_emit_count(object: Object, signal: StringName, expected_count: int, message: String = "")

bool

assert_signal_emitted(object: Object, signal: StringName, message: String = "")

bool

assert_signal_emitted_with_parameters(object: Object, signal: StringName, expected_parameters: Array, index: int = -1, message: String = "")

bool

assert_signal_not_emitted(object: Object, signal: StringName, message: String = "")

bool

assert_string_contains(got: String, expected: String, text: String = "")

bool

assert_string_ends_with(got: String, expected: String, text: String = "")

bool

assert_string_starts_with(got: String, expected: String, text: String = "")

bool

assert_true(condition: bool, text: String = "")

bool

assert_typeof(variant: Variant, type: Variant.Type, text: String = "")

void

autofree(object: Object)

void

autoqfree(node: Node)

void

clear_parameters()

Variant

create_double(thing: Variant)

Variant

double_resource(path: String)

Variant

double_singleton(name: String)

void

fail_test(text: String = "")

int

get_assert_count()

int

get_call_count(object: Object, method: StringName, args: Array = [])

Array

get_call_parameters(object: Object, method: StringName, index: int = -1)

int

get_current_parameter_index() const

int

get_fail_count()

Variant

get_logger()

int

get_parameter_count() const

int

get_pass_count()

int

get_pending_count()

int

get_signal_emit_count(object: Object, signal: StringName)

Array

get_signal_parameters(object: Object, signal: StringName, index: int = -1)

Dictionary

get_summary()

String

get_summary_text()

int

get_test_count()

bool

has_parameters() const

void

p(text: String)

void

pass_test(text: String = "")

void

pending(text: String = "")

void

print_log(text: String)

void

set_current_parameter_index(index: int)

void

set_doubler(doubler: AutoworkDoubler)

void

set_logger(logger: AutoworkLogger)

void

set_spy(spy: AutoworkSpy)

void

set_stubber(stubber: AutoworkStubber)

void

simulate(node: Node, times: int, delta: float, check_is_processing: bool = false, simulate_method: SimulateMethod = 0)

bool

skip_if_engine_version_lt(version: String, check_godot: bool = false)

bool

skip_if_engine_version_ne(version: String, check_godot: bool = false)

bool

skip_if_godot_version_lt(version: String)

bool

skip_if_godot_version_ne(version: String)

Variant

spy(thing: Variant)

AutoworkStubParams

stub(object: Variant, method: StringName = &"")

Variant

use_parameters(params: Array)

Signal

wait_for_signal(signal: Signal, max_wait: float, message: String = "")

Signal

wait_physics_frames(frames: int, message: String = "")

Signal

wait_process_frames(frames: int, message: String = "")

Signal

wait_seconds(seconds: float, message: String = "")

Signal

wait_until(callable: Callable, max_wait: float, message: String = "")

Signal

wait_while(callable: Callable, max_wait: float, message: String = "")

void

watch_signal(object: Object, signal: StringName)

void

watch_signals(object: Object)


Signals๏ƒ

frameout() ๐Ÿ”—

Signal used by wait_process_frames() and wait_physics_frames().


timeout(return_value: bool) ๐Ÿ”—

Signal used by wait_while(), wait_until() and wait_for_signal().


Enumerations๏ƒ

enum SimulateMethod: ๐Ÿ”—

SimulateMethod SIMULATE_BOTH = 0

Call both Node._process() and Node._physics_process().

See simulate().

SimulateMethod SIMULATE_PROCESS = 1

Call only Node._process().

See simulate().

SimulateMethod SIMULATE_PHYSICS = 2

Call only Node._physics_process().

See simulate().


Method Descriptions๏ƒ

void _after_all() virtual ๐Ÿ”—

Method called after all tests.


void _after_each() virtual ๐Ÿ”—

Method called after each test.


void _before_all() virtual ๐Ÿ”—

Method called before all tests.


void _before_each() virtual ๐Ÿ”—

Method called before each test.


Node add_child_autofree(child: Node) ๐Ÿ”—

Adds a child node to the test sandbox and schedules it for automatic deletion at the end of the test.


Node add_child_autoqfree(child: Node) ๐Ÿ”—

Adds a child node to the test sandbox and schedules it for automatic deletion at the end of the test.


bool assert_accessors(object: Object, property: StringName, default: Variant, set_to: Variant) ๐Ÿ”—

Asserts that the property of object has a getter method that returns default by

default and a setter method that correctly updates the property.

The assertion calls the setter with set_to and then verifies that the getter returns the new value.

assert_accessors(player, "position", Vector2.ZERO, Vector2(200, 200))

bool assert_almost_eq(got: Variant, expected: Variant, error_margin: Variant, text: String = "") ๐Ÿ”—

Asserts that got is equal to expected within a margin of error defined by error_margin.

assert_almost_eq(1.05, 1.0, 0.1, "The value is inside of the range [0.9, 1.1]")

bool assert_almost_ne(got: Variant, expected: Variant, error_margin: Variant, text: String = "") ๐Ÿ”—

Asserts that got is not equal to expected within a margin of error defined by error_margin.

assert_almost_ne(0.5, 1.0, 0.1, "The value is outside of the range [0.9, 1.1]")

bool assert_between(got: Variant, expect_low: Variant, expect_high: Variant, text: String = "") ๐Ÿ”—

Asserts that got is between expect_low and expect_high.

assert_between(5, 1, 10, "5 is between 1 and 10")

bool assert_called(object: Object, method: StringName, args: Array = [], text: String = "") ๐Ÿ”—

Asserts that a method was called on a stubbed or spied object.

assert_called(obj, "call_me_maybe", [1, 2])

bool assert_called_count(object: Object, method: StringName, expected_count: int, args: Array = [], text: String = "") ๐Ÿ”—

Asserts the spied method was called the expected number of times.

assert_call_count(child_node, "get_parent", 1, [], "get_parent called once")

bool assert_connected(source: Object, target: Object, signal: StringName, method_name: StringName = "") ๐Ÿ”—

Asserts that the signal from source is connected to method_name from target.


bool assert_dir_does_not_exist(dir_path: String, text: String = "") ๐Ÿ”—

Asserts that a directory at dir_path does not exist.

assert_dir_does_not_exist("res://void.txt")

bool assert_dir_exists(dir_path: String, text: String = "") ๐Ÿ”—

Asserts that a directory at dir_path does exist.

assert_dir_exists("res://scripts/player.gd")

bool assert_does_not_have(variant: Variant, element: Variant, text: String = "") ๐Ÿ”—

Asserts that variant does not have the specified element.

Note: only types of Array, Dictionary and String are supported.

assert_does_not_have({"a": 1, "b": 2}, "c", "Dict does not have key c")

bool assert_eq(got: Variant, expected: Variant, text: String = "") ๐Ÿ”—

Asserts that expected is equal to got.

assert_eq(2 + 2, 4, "2 + 2 is equal to 4")

bool assert_eq_deep(got: Variant, expected: Variant, text: String = "") ๐Ÿ”—

This is similar to assert_eq().

When this assert fails with Array or Dictionary as parameters, it will log the difference between the params.


bool assert_exports(object: Object, property: StringName, type: Variant.Type) ๐Ÿ”—

Asserts that object exports a property with the name property and a type of type.


bool assert_false(condition: bool, text: String = "") ๐Ÿ”—

Asserts that condition is false.


bool assert_file_does_not_exist(file_path: String, text: String = "") ๐Ÿ”—

Asserts a file does not exist at the specified file_path.

assert_file_does_not_exist("res://this_does_not_exist.txt")

bool assert_file_empty(file_path: String, text: String = "") ๐Ÿ”—

Asserts the specified file at file_path is empty.


bool assert_file_exists(file_path: String, text: String = "") ๐Ÿ”—

Asserts a file exist at the specified file_path.

assert_file__exist("res://scripts/player.gd")

bool assert_file_not_empty(file_path: String, text: String = "") ๐Ÿ”—

Asserts the specified file at file_path is not empty.


bool assert_freed(object: Object, text: String = "") ๐Ÿ”—

Asserts that the object has been freed.


bool assert_ge(got: Variant, expected: Variant, text: String = "") ๐Ÿ”—

Asserts got is greater than or equal to expected.


bool assert_gt(got: Variant, expected: Variant, text: String = "") ๐Ÿ”—

Asserts got is greater than expected.


bool assert_gte(got: Variant, expected: Variant, text: String = "") ๐Ÿ”—

Alias of assert_ge().


bool assert_has(variant: Variant, element: Variant, text: String = "") ๐Ÿ”—

Asserts that variant has the specified element.

Note: only types of Array, Dictionary and String are supported.

assert_has([1, 2, 3], 2, "Array has 2")

bool assert_has_method(object: Object, method: StringName, text: String = "") ๐Ÿ”—

Asserts that the object has method.

assert_has_method(self, "_ready")

bool assert_has_signal(object: Object, signal: StringName, message: String = "") ๐Ÿ”—

Asserts that the object has signal.

assert_has_signal(node2d, "draw", "Node2D has 'draw' signal")

bool assert_is(object: Object, class: String, text: String = "") ๐Ÿ”—

Asserts that object extends class.

assert_is(player, "CharacterBody2D", "player is a CharacterBody2D")

bool assert_le(got: Variant, expected: Variant, text: String = "") ๐Ÿ”—

Asserts got is less than or equal to expected.


bool assert_lt(got: Variant, expected: Variant, text: String = "") ๐Ÿ”—

Asserts got is less than expected.


bool assert_lte(got: Variant, expected: Variant, text: String = "") ๐Ÿ”—

Alias of assert_le().


bool assert_ne(got: Variant, expected: Variant, text: String = "") ๐Ÿ”—

Asserts that got is not equal to expected.

assert_ne("hello", "world")

bool assert_ne_deep(got: Variant, expected: Variant, text: String = "") ๐Ÿ”—

This is similar to assert_eq().

When this assert fails with Array or Dictionary as parameters, it will log the difference between the params.


bool assert_no_new_orphans(message: String = "") ๐Ÿ”—

Asserts that no new orphaned instances were created since the test began.


bool assert_not_between(got: Variant, expect_low: Variant, expect_high: Variant, text: String = "") ๐Ÿ”—

Asserts that got is not between expect_low and expect_high.

assert_not_between(5, 1, 10, "15 is not between 1 and 10")

bool assert_not_called(object: Object, method: StringName, args: Array = [], text: String = "") ๐Ÿ”—

Asserts that a method was not called on a stubbed or spied object.

assert_not_called(obj, "get_name")

bool assert_not_connected(source: Object, target: Object, signal: StringName, method_name: StringName = "") ๐Ÿ”—

Asserts that the signal from source is not connected to method_name from target.

assert_not_connected(base, self, "child_exiting_tree", "fail_test")

bool assert_not_freed(object: Object, text: String = "") ๐Ÿ”—

Asserts that the object has not been freed.


bool assert_not_null(got: Variant, text: String = "") ๐Ÿ”—

Asserts that got is not null.


bool assert_not_same(got: Variant, expected: Variant, text: String = "") ๐Ÿ”—

Asserts got and expected are not the same.


bool assert_not_typeof(variant: Variant, type: Variant.Type, text: String = "") ๐Ÿ”—

Asserts that the type of variant is not type.

assert_not_typeof("5", TYPE_INT)

bool assert_null(got: Variant, text: String = "") ๐Ÿ”—

Asserts that got is null.


bool assert_property(object: Object, property: String, default: Variant, set_to: Variant) ๐Ÿ”—

Asserts that the object has a setter and getter methods for the property.

It will then use the getter to check if default is returned.

Then use the setter with set_to and verify the getter returns the same value.

assert_property(player, "position", Vector2(0, 0), Vector2(100, 100))

bool assert_property_with_backing_variable(object: Object, property: String, default_value: Variant, new_value: Variant, backed_by_name: String = "") ๐Ÿ”—

Assumes backing variable will be _[param property].

This will perform all the asserts of assert_property().

Then this will set the value through the setter and check the backing variable value.

It will then reset through the setter and set the backing variable and check the getter.


bool assert_readonly_property(object: Object, property: String, new_value: Variant, expected: Variant, text: String = "") ๐Ÿ”—

Asserts the property is readonly by trying set it to new_value and then

checking if the value is the same as expected.


bool assert_same(got: Variant, expected: Variant, text: String = "") ๐Ÿ”—

Asserts got and expected are the same.


bool assert_set_property(object: Object, property: String, new_value: Variant, expected: Variant, text: String = "") ๐Ÿ”—

Sets the property of object to new_value,

then checks if the property is set to expected.

var a = 0:
    set(new_value):
        a = new_value + 2

assert_set_property(self, "a", 2, 4)

bool assert_signal_emit_count(object: Object, signal: StringName, expected_count: int, message: String = "") ๐Ÿ”—

Asserts that signal was fired expected_count times from object.

assert_signal_emit_count(node, "draw", 2, "Signal 'draw' was emitted twice")

bool assert_signal_emitted(object: Object, signal: StringName, message: String = "") ๐Ÿ”—

Asserts that signal was emitted by object.

assert_signal_emitted(player, "dead", "the player is dead")

bool assert_signal_emitted_with_parameters(object: Object, signal: StringName, expected_parameters: Array, index: int = -1, message: String = "") ๐Ÿ”—

Asserts that signal was emitted by object with expected_parameters.

An optional index can be passed when a signal has fired more than once.

The default is to retrieve the most recent emission of the signal.

assert_signal_emitted_with_parameters(node, "child_entered_tree", [node], 0, "Signal parameters matched")

bool assert_signal_not_emitted(object: Object, signal: StringName, message: String = "") ๐Ÿ”—

Asserts that signal was not emitted by object.


bool assert_string_contains(got: String, expected: String, text: String = "") ๐Ÿ”—

Assert that the String got contains expected.

assert_string_contains("Hello, World!", "World")

bool assert_string_ends_with(got: String, expected: String, text: String = "") ๐Ÿ”—

Assert that the String got ends with expected.

assert_string_ends_with("Hello, World!", "!")

bool assert_string_starts_with(got: String, expected: String, text: String = "") ๐Ÿ”—

Assert that the String got starts with expected.

assert_string_starts_with("Hello, World!", "H")

bool assert_true(condition: bool, text: String = "") ๐Ÿ”—

Asserts that condition is true.


bool assert_typeof(variant: Variant, type: Variant.Type, text: String = "") ๐Ÿ”—

Asserts that the type of variant is type.

assert_typeof(5, TYPE_INT)

void autofree(object: Object) ๐Ÿ”—

Marks object to be freed after the test finishes.


void autoqfree(node: Node) ๐Ÿ”—

Marks node to be freed after the test finishes.


void clear_parameters() ๐Ÿ”—

Clears all stored test parameters for the current test context.


Variant create_double(thing: Variant) ๐Ÿ”—

Creates a test double (mock or stub) from the provided object, scene, or script.


Variant double_resource(path: String) ๐Ÿ”—

Creates a test double (mock/stub) of a specific resource, scene, or script.


Variant double_singleton(name: String) ๐Ÿ”—

Creates a test double (mock/stub) of a specific resource, scene, or script.

double_singleton("FakeSingletonName")

void fail_test(text: String = "") ๐Ÿ”—

Marks the test as failing. Same as a failing assert.


int get_assert_count() ๐Ÿ”—

Returns the total number of asserts this script has made up to this method call.

Call in _after_all() to get total count for a script.


int get_call_count(object: Object, method: StringName, args: Array = []) ๐Ÿ”—

Returns the call count for a method with optional args.


Array get_call_parameters(object: Object, method: StringName, index: int = -1) ๐Ÿ”—

Get the parameters for a method call to a doubled object.

By default it will return the most recent call.


int get_current_parameter_index() const ๐Ÿ”—

Returns the index of the currently active parameter set for a parameterized test.


int get_fail_count() ๐Ÿ”—

Returns the total number of failing asserts this script has made up to this method call.

Call in _after_all() to get total count for a script.


Variant get_logger() ๐Ÿ”—

Returns the logger instance associated with this test.


int get_parameter_count() const ๐Ÿ”—

Returns the total number of parameter sets available for this parameterized test.


int get_pass_count() ๐Ÿ”—

Returns the total number of passing asserts this script has made up to this method call.

Call in _after_all() to get total count for a script.


int get_pending_count() ๐Ÿ”—

Returns the total number of pending asserts this script has made up to this method call.

Call in _after_all() to get total count for a script.


int get_signal_emit_count(object: Object, signal: StringName) ๐Ÿ”—

This will return the number of times a signal was fired.


Array get_signal_parameters(object: Object, signal: StringName, index: int = -1) ๐Ÿ”—

Returns the parameters of any watched signal.

This works the same way that assert_signal_emitted_with_parameters() does.


Dictionary get_summary() ๐Ÿ”—

Returns a structured summary of the current test execution results.


String get_summary_text() ๐Ÿ”—

Returns a human-readable summary of the current test execution results.


int get_test_count() ๐Ÿ”—

Returns the total number of tests in this script.


bool has_parameters() const ๐Ÿ”—

Returns true if this test has one or more parameter sets defined.


void p(text: String) ๐Ÿ”—

Alias of print_log()


void pass_test(text: String = "") ๐Ÿ”—

Marks the test as passing. Same as a passing assert.


void pending(text: String = "") ๐Ÿ”—

Mark the current test as pending.


void print_log(text: String) ๐Ÿ”—

Prints a message to the Autowork logger console.


void set_current_parameter_index(index: int) ๐Ÿ”—

Sets the current parameter index for a parameterized test execution.


void set_doubler(doubler: AutoworkDoubler) ๐Ÿ”—

Sets the AutoworkDoubler instance used by this test.


void set_logger(logger: AutoworkLogger) ๐Ÿ”—

Sets the AutoworkLogger instance used by this test.


void set_spy(spy: AutoworkSpy) ๐Ÿ”—

Sets the AutoworkSpy instance used by this test.


void set_stubber(stubber: AutoworkStubber) ๐Ÿ”—

Sets the AutoworkStubber instance used by this test.


void simulate(node: Node, times: int, delta: float, check_is_processing: bool = false, simulate_method: SimulateMethod = 0) ๐Ÿ”—

Simulate a number of frames by calling Node._process() or Node._physics_process() on an object and all of its descendents.

By default it will call both Node._process() and Node._physics_process().

If check_is_processing is true, it will check if node is can process, see Node.is_processing() and Node.is_physics_processing().


bool skip_if_engine_version_lt(version: String, check_godot: bool = false) ๐Ÿ”—

Skip test if the Blazium Engine version is less than version ("external_major.external_minor.external_patch").

If check_godot is true, it will check the Godot Engine version instead ("major.minor.patch").

See also Engine.get_version_info().


bool skip_if_engine_version_ne(version: String, check_godot: bool = false) ๐Ÿ”—

Skip test if the Blazium Engine version different from version ("external_major.external_minor.external_patch").

If check_godot is true, it will check the Godot Engine version instead ("major.minor.patch").

See also Engine.get_version_info().


bool skip_if_godot_version_lt(version: String) ๐Ÿ”—

Alias of skip_if_engine_version_lt().

Skip test if the Godot Engine version is less than version ("major.minor.patch").

This is an alias for skip_if_engine_version_lt().

See also Engine.get_version_info().


bool skip_if_godot_version_ne(version: String) ๐Ÿ”—

Alias of skip_if_engine_version_ne().

Skip test if the Godot Engine version different from version ("major.minor.patch").

This is an alias for skip_if_engine_version_ne().

See also Engine.get_version_info().


Variant spy(thing: Variant) ๐Ÿ”—

Creates and returns a spy-wrapped version of the provided object.


AutoworkStubParams stub(object: Variant, method: StringName = &"") ๐Ÿ”—

Creates a stub configuration for the given object and method.


Variant use_parameters(params: Array) ๐Ÿ”—

Sets the parameter sets for a parameterized test.


Signal wait_for_signal(signal: Signal, max_wait: float, message: String = "") ๐Ÿ”—

Will wait for signal emission for a max_wait amount of seconds.

This returns timeout, the return value will be true if the signal was emitted, false if max_wait was reached.

var success = await wait_for_signal(player.respawned, 2, "Player should respawn within 2 second")
if success:
    pass_test("Player repawned within 2 seconds")
else:
    fail_test("Player respawn fail")

Signal wait_physics_frames(frames: int, message: String = "") ๐Ÿ”—

Will wait for a number of physics frames, this returns frameout after waiting all frames.

await wait_physics_frames(2, "Wait physics frames completed")

Signal wait_process_frames(frames: int, message: String = "") ๐Ÿ”—

Will wait for a number of process frames, this returns frameout after waiting all frames.

await wait_process_frames(2, "Wait process frames completed")

Signal wait_seconds(seconds: float, message: String = "") ๐Ÿ”—

Will wait for seconds to pass.

await wait_seconds(2, "Wait 2s completed")

Signal wait_until(callable: Callable, max_wait: float, message: String = "") ๐Ÿ”—

Will wait until callable returns true for a max_wait amount of seconds.

This returns timeout, the return value will be true if the callable returned true, false if max_wait was reached.


Signal wait_while(callable: Callable, max_wait: float, message: String = "") ๐Ÿ”—

Will wait while callable returns true for a max_wait amount of seconds.

This returns timeout, the return value will be true if the callable returned false, false if max_wait was reached.


void watch_signal(object: Object, signal: StringName) ๐Ÿ”—

Starts watching a specific signal emitted by the given object.


void watch_signals(object: Object) ๐Ÿ”—

Starts watching all signals emitted by the given object.