@@ -77,31 +77,18 @@ describe('uts/rest/unit/channel/annotations', function () {
7777 *
7878 * Publishing an annotation without a type field should throw an error
7979 * with code 40003.
80- *
81- * NOTE: ably-js does not currently validate the type field in
82- * constructValidateAnnotation(). This test documents the spec
83- * requirement (RSAN1a3) as a known deviation — the publish succeeds
84- * without a type instead of throwing.
8580 */
8681 // UTS: rest/unit/RSAN1a3/publish-type-required-0
8782 it ( 'RSAN1a3 - type required' , async function ( ) {
88- // DEVIATION: see deviations.md
89- if ( ! process . env . RUN_DEVIATIONS ) this . skip ( ) ;
90- const captured : any [ ] = [ ] ;
9183 const mock = new MockHttpClient ( {
9284 onConnectionAttempt : ( conn ) => conn . respond_with_success ( ) ,
93- onRequest : ( req ) => {
94- captured . push ( req ) ;
95- req . respond_with ( 201 , { } ) ;
96- } ,
85+ onRequest : ( req ) => req . respond_with ( 201 , { } ) ,
9786 } ) ;
9887 installMockHttp ( mock ) ;
9988
10089 const client = new Ably . Rest ( { key : 'appId.keyId:keySecret' , useBinaryProtocol : false } ) ;
10190 const ch = client . channels . get ( 'test' ) ;
10291
103- // Spec (RSAN1a3): publishing without a type MUST throw with code 40003.
104- // DEVIATION: ably-js does not validate type. See deviations.md.
10592 try {
10693 await ch . annotations . publish ( 'msg-serial-1' , { name : 'like' } ) ;
10794 expect . fail ( 'Expected publish without type to throw with code 40003' ) ;
0 commit comments