Add tests for get_tree() and potential fixes for it missing

This commit is contained in:
JeremyStar™ 2024-03-28 13:20:56 +01:00
parent f8c5e4e162
commit 6b6c1db55e
2 changed files with 11 additions and 0 deletions

View file

@ -0,0 +1,9 @@
extends BessereTestsTest
func test_boolean() -> void:
if is_inside_tree(): test_status = 0
else: test_status = 2
func test_existance() -> void:
if get_tree() == null: test_status = 2
else: test_status = 0

View file

@ -19,6 +19,8 @@ var stats_forgot: int = 0
var stats_unknown: int = 0
func _ready() -> void:
await get_tree().process_frame
# Load configuration
if FileAccess.file_exists(config_path):
config.set_script(load(config_path))