Skip to content

Commit 7fa08af

Browse files
committed
fix RecordingListener onError signature to match 2-arg invocation
1 parent 5cd7a7a commit 7fa08af

1 file changed

Lines changed: 5 additions & 5 deletions

File tree

tests/RecordingListener.cfc

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -14,11 +14,11 @@ component hint="Test fixture — records every callback invocation for assertion
1414
arrayAppend( variables.events, "onClose" );
1515
}
1616

17-
function onError( type, cause, data ) {
18-
var entry = "onError:" & arguments.type;
19-
if ( structKeyExists( arguments, "data" ) && !isNull( arguments.data ) )
20-
entry &= ":withData";
21-
arrayAppend( variables.events, entry );
17+
function onError( type, cause ) {
18+
// Match the 2-arg signature the existing WebSocketListener uses. The 3rd
19+
// `data` arg is only populated for `message`-type errors; if we need to
20+
// test that later, add a separate fixture.
21+
arrayAppend( variables.events, "onError:" & arguments.type );
2222
}
2323

2424
function onPing() {

0 commit comments

Comments
 (0)