Cyclic imports don't really work in ECMAScript modules (they're often undefined) so I should probably work around them, and maybe it's not even a bug then, but perhaps having a warning in the documentation or even detecting it would be helpful. I'll try to reproduce in quickjs by itself to confirm if it's a bug here or in quickjs.
(gdb) bt -50
#37664 0x00000000004fc7bf in js_resolve_module (ctx=0x417b48f0, m=0x5405db30) at modules/ECMAScript/quickjs/quickjs/quickjs.c:27441
#37665 0x000000000050af7e in __JS_EvalInternal (ctx=0x417b48f0, this_obj=...,
input=0x5405d150 "import TestA from \"./TestA\"\n\nclass TestB extends godot.Node2D {\n _ready() {\n testA.connect(TestA.my_signal, () => { godot.print(\"my_signal!\") })\n }\n}\n\nexport default TestB\n",
input_len=185, filename=0x5405ba70 "res://TestB.jsx", flags=33, scope_idx=-1) at modules/ECMAScript/quickjs/quickjs/quickjs.c:33094
#37666 0x000000000050b15b in JS_EvalInternal (ctx=0x417b48f0, this_obj=...,
input=0x5405d150 "import TestA from \"./TestA\"\n\nclass TestB extends godot.Node2D {\n _ready() {\n testA.connect(TestA.my_signal, () => { godot.print(\"my_signal!\") })\n }\n}\n\nexport default TestB\n",
input_len=185, filename=0x5405ba70 "res://TestB.jsx", flags=33, scope_idx=-1) at modules/ECMAScript/quickjs/quickjs/quickjs.c:33119
#37667 0x000000000050b360 in JS_Eval (ctx=0x417b48f0,
input=0x5405d150 "import TestA from \"./TestA\"\n\nclass TestB extends godot.Node2D {\n _ready() {\n testA.connect(TestA.my_signal, () => { godot.print(\"my_signal!\") })\n }\n}\n\nexport default TestB\n",
input_len=185, filename=0x5405ba70 "res://TestB.jsx", eval_flags=33) at modules/ECMAScript/quickjs/quickjs/quickjs.c:33149
#37668 0x0000000000463725 in QuickJSBinder::js_compile_module (this=0x415acc20, ctx=0x417b48f0, p_code=..., p_filename=..., r_error=0x254f8e00) at modules/ECMAScript/quickjs/quickjs_binder.cpp:639
#37669 0x00000000004630d3 in QuickJSBinder::js_module_loader (ctx=0x417b48f0, module_name=0x5405c0a0 "res://TestB", opaque=0x415acc20) at modules/ECMAScript/quickjs/quickjs_binder.cpp:574
#37670 0x00000000004fb66b in js_host_resolve_imported_module (ctx=0x417b48f0, base_module_name=13844, module_name1=13850) at modules/ECMAScript/quickjs/quickjs/quickjs.c:26993
#37671 0x00000000004fc7bf in js_resolve_module (ctx=0x417b48f0, m=0x5405b760) at modules/ECMAScript/quickjs/quickjs/quickjs.c:27441
#37672 0x000000000050af7e in __JS_EvalInternal (ctx=0x417b48f0, this_obj=...,
input=0x5405b420 "import TestB from \"./TestB\";\n\nexport default class TestA extends godot.Area2D {\n static my_signal = \"my_signal\"\n\n _ready() {\n this.add_child(new TestB())\n }\n}\n\ngodot.register_signal(Te"..., input_len=221, filename=0x540098d0 "res://TestA.jsx", flags=33, scope_idx=-1) at modules/ECMAScript/quickjs/quickjs/quickjs.c:33094
#37673 0x000000000050b15b in JS_EvalInternal (ctx=0x417b48f0, this_obj=...,
input=0x5405b420 "import TestB from \"./TestB\";\n\nexport default class TestA extends godot.Area2D {\n static my_signal = \"my_signal\"\n\n _ready() {\n this.add_child(new TestB())\n }\n}\n\ngodot.register_signal(Te"..., input_len=221, filename=0x540098d0 "res://TestA.jsx", flags=33, scope_idx=-1) at modules/ECMAScript/quickjs/quickjs/quickjs.c:33119
#37674 0x000000000050b360 in JS_Eval (ctx=0x417b48f0,
input=0x5405b420 "import TestB from \"./TestB\";\n\nexport default class TestA extends godot.Area2D {\n static my_signal = \"my_signal\"\n\n _ready() {\n this.add_child(new TestB())\n }\n}\n\ngodot.register_signal(Te"..., input_len=221, filename=0x540098d0 "res://TestA.jsx", eval_flags=33) at modules/ECMAScript/quickjs/quickjs/quickjs.c:33149
#37675 0x0000000000463725 in QuickJSBinder::js_compile_module (this=0x415acc20, ctx=0x417b48f0, p_code=..., p_filename=..., r_error=0x254f94a0) at modules/ECMAScript/quickjs/quickjs_binder.cpp:639
#37676 0x000000000046e4e5 in QuickJSBinder::parse_ecma_class (this=0x415acc20, p_code=..., p_path=..., r_error=0x254f94a0) at modules/ECMAScript/quickjs/quickjs_binder.cpp:2003
#37677 0x0000000000459e7a in ECMAScript::reload (this=0x5405aea0, p_keep_state=true) at modules/ECMAScript/ecmascript.cpp:92
#37678 0x000000000045aaf7 in ResourceFormatLoaderECMAScript::load (this=0x415ab810, p_path=..., p_original_path=..., r_error=0x0) at modules/ECMAScript/ecmascript.cpp:256
#37679 0x0000000001a181e6 in ResourceLoader::_load (p_path=..., p_original_path=..., p_type_hint=..., p_no_cache=false, r_error=0x0) at core/io/resource_loader.cpp:270
#37680 0x0000000001a18ca3 in ResourceLoader::load (p_path=..., p_type_hint=..., p_no_cache=false, r_error=0x0) at core/io/resource_loader.cpp:401
#37681 0x0000000001616d8f in ResourceInteractiveLoaderText::poll (this=0x540692e0) at scene/resources/resource_format_text.cpp:433
#37682 0x0000000001a168ff in ResourceFormatLoader::load (this=0x34c6bcb0, p_path=..., p_original_path=..., r_error=0x254fa25c) at core/io/resource_loader.cpp:197
#37683 0x0000000001a181e6 in ResourceLoader::_load (p_path=..., p_original_path=..., p_type_hint=..., p_no_cache=true, r_error=0x254fa25c) at core/io/resource_loader.cpp:270
#37684 0x0000000001a18ca3 in ResourceLoader::load (p_path=..., p_type_hint=..., p_no_cache=true, r_error=0x254fa25c) at core/io/resource_loader.cpp:401
#37685 0x0000000000b52fd6 in EditorNode::load_scene (this=0x43fc5060, p_scene=..., p_ignore_broken_deps=false, p_set_inherited=false, p_clear_errors=true, p_force_open_imported=false) at editor/editor_node.cpp:3371
#37686 0x0000000000b53e20 in EditorNode::open_request (this=0x43fc5060, p_path=...) at editor/editor_node.cpp:3488
#37687 0x0000000000c10687 in FileSystemDock::_select_file (this=0x5cb42880, p_path=..., p_select_in_favorites=false) at editor/filesystem_dock.cpp:832
#37688 0x0000000000c1091a in FileSystemDock::_tree_activate_file (this=0x5cb42880) at editor/filesystem_dock.cpp:851
#37689 0x00000000022be420 in MethodBind0::call (this=0x415a3890, p_object=0x5cb42880, p_args=0x254fa9b0, p_arg_count=0, r_error=...) at ./core/method_bind.gen.inc:59
#37690 0x00000000018c5549 in Object::call (this=0x5cb42880, p_method=..., p_args=0x254fa9b0, p_argcount=0, r_error=...) at core/object.cpp:922
#37691 0x00000000018c7184 in Object::emit_signal (this=0x5cb57a60, p_name=..., p_args=0x254fa9b0, p_argcount=0) at core/object.cpp:1249
#37692 0x00000000018c780d in Object::emit_signal (this=0x5cb57a60, p_name=..., p_arg1=..., p_arg2=..., p_arg3=..., p_arg4=..., p_arg5=...) at core/object.cpp:1306
#37693 0x0000000001317cb3 in Tree::_gui_input (this=0x5cb57a60, p_event=...) at scene/gui/tree.cpp:2727
#37694 0x00000000022c031b in MethodBind1<Ref<InputEvent> >::call (this=0x34d7a610, p_object=0x5cb57a60, p_args=0x254fb590, p_arg_count=1, r_error=...) at ./core/method_bind.gen.inc:775
#37695 0x00000000018c4b0b in Object::call_multilevel (this=0x5cb57a60, p_method=..., p_args=0x254fb590, p_argcount=1) at core/object.cpp:764
#37696 0x00000000018c524d in Object::call_multilevel (this=0x5cb57a60, p_name=..., p_arg1=..., p_arg2=..., p_arg3=..., p_arg4=..., p_arg5=...) at core/object.cpp:864
#37697 0x00000000011bde80 in Viewport::_gui_call_input (this=0x43f67520, p_control=0x5cb57a60, p_input=...) at scene/main/viewport.cpp:1669
#37698 0x00000000011bf128 in Viewport::_gui_input_event (this=0x43f67520, p_event=...) at scene/main/viewport.cpp:1979
#37699 0x00000000011c3ae0 in Viewport::input (this=0x43f67520, p_event=...) at scene/main/viewport.cpp:2825
#37700 0x00000000011bcc98 in Viewport::_vp_input (this=0x43f67520, p_ev=...) at scene/main/viewport.cpp:1446
#37701 0x00000000022fc3db in MethodBind1<Ref<InputEvent> const&>::call (this=0x34c86540, p_object=0x43f67520, p_args=0x254fc2c0, p_arg_count=1, r_error=...) at ./core/method_bind.gen.inc:775
#37702 0x00000000018c5549 in Object::call (this=0x43f67520, p_method=..., p_args=0x254fc2c0, p_argcount=1, r_error=...) at core/object.cpp:922
#37703 0x00000000018c519e in Object::call (this=0x43f67520, p_name=..., p_arg1=..., p_arg2=..., p_arg3=..., p_arg4=..., p_arg5=...) at core/object.cpp:848
#37704 0x00000000011a2f95 in SceneTree::call_group_flags (this=0x43f671d0, p_call_flags=2, p_group=..., p_function=..., p_arg1=..., p_arg2=..., p_arg3=..., p_arg4=..., p_arg5=...) at scene/main/scene_tree.cpp:275
#37705 0x00000000011a3bfd in SceneTree::input_event (this=0x43f671d0, p_event=...) at scene/main/scene_tree.cpp:431
#37706 0x0000000000416fed in InputDefault::_parse_input_event_impl (this=0x2a350d00, p_event=..., p_is_emulated=false) at main/input_default.cpp:442
#37707 0x0000000000416060 in InputDefault::parse_input_event (this=0x2a350d00, p_event=...) at main/input_default.cpp:259
#37708 0x0000000000418081 in InputDefault::flush_accumulated_events (this=0x2a350d00) at main/input_default.cpp:678
#37709 0x000000000040bc2e in OS_Windows::process_events (this=0x254fc910) at platform/windows/os_windows.cpp:2598
#37710 0x00000000004100a4 in OS_Windows::run (this=0x254fc910) at platform/windows/os_windows.cpp:3396
#37711 0x00000000004019da in widechar_main (argc=2, argv=0x256cc710) at platform/windows/godot_windows.cpp:161
#37712 0x0000000000401af3 in _main () at platform/windows/godot_windows.cpp:184
#37713 0x0000000000401b28 in main (_argc=2, _argv=0x1e8f80) at platform/windows/godot_windows.cpp:201