+# to prepare first test, initiate connected state
+> /connect foo.bar.baz foo bar:baz
+| isupport-clear-in
+1 ..$ isupport cleared
+1 ..$ isupport:CHANTYPES set to: [#&]
+1 ..$ isupport:PREFIX set to: [(ov)@+]
+1 ..$ isupport:USERLEN set to: [10]
+| isupport-clear-out
+1 ..$ caps cleared
+1 ..$ users cleared
+1 ..$ channels cleared
+, ..$ DISCONNECTED
+1 ..$ hostname set to: [foo.bar.baz]
+1 ..$ port set to: [-1]
+1 ..$ nick_wanted set to: [foo]
+1 ..$ user_wanted set to: [baz]
+1 ..$ realname set to: [bar]
+1 ..$ port set to: [6697]
+| connecting-in
+1 ..$ connection_state set to: [connecting]
+1 ..$ connection_state set to: [connected]
+, ..$ CONNECTED
+1 ..> CAP LS :302
+1 ..> USER baz 0 * :bar
+1 ..> NICK :foo
+| connecting-out
+
+# test default ERROR handling
+:0:1 ..< ERROR :abc def ghi
+1 ..$ connection_state set to: [abc def ghi]
+| disconnecting-in
+repeat isupport-clear-in isupport-clear-out
+1 ..$ connection_state set to: []
+, ..$ DISCONNECTED
+| disconnecting-out
+
+# to prepare next test, get back to connected state
+> /window 1
+> /reconnect
+repeat connecting-in connecting-out
+
+# test "timed out)" ERROR handling
+:0:1 ..< ERROR :Closing link: (Connection timed out)
+1 ..$ connection_state set to: [Closing link: (Connection timed out)]
+repeat disconnecting-in disconnecting-out
+1 .!$ will retry connecting in 1 seconds
+
+# over and out
+> /quit
+0 ..<