From 8d162a0eefde034829382ceee846b31a2c1a5f0b Mon Sep 17 00:00:00 2001 From: Lawrence Forooghian Date: Tue, 9 Jul 2024 11:01:17 -0300 Subject: [PATCH] [UTS] Add some exclusions to private API reporting These are APIs that for the purposes of the unified test suite we can not consider as private for the time being (so as to not clutter up the private API reporting data). --- scripts/processPrivateApiData/exclusions.ts | 22 +++++++++++++++++---- 1 file changed, 18 insertions(+), 4 deletions(-) diff --git a/scripts/processPrivateApiData/exclusions.ts b/scripts/processPrivateApiData/exclusions.ts index 7578063c4..b39383525 100644 --- a/scripts/processPrivateApiData/exclusions.ts +++ b/scripts/processPrivateApiData/exclusions.ts @@ -6,11 +6,25 @@ type ExclusionRule = { helper?: string; }; -/** - * This exclusions mechanism is not currently being used on `main`, but I will use it on a separate unified test suite branch in order to exclude some private API usage that can currently be disregarded in the context of the unified test suite. - */ export function applyingExclusions(usageDtos: PrivateApiUsageDto[]) { - const exclusionRules: ExclusionRule[] = []; + const exclusionRules: ExclusionRule[] = [ + // This is all helper stuff that we could pull into the test suite, and which for now we could just continue using the version privately exposed by ably-js, even in the UTS. + { privateAPIIdentifier: 'call.BufferUtils.areBuffersEqual' }, + { privateAPIIdentifier: 'call.BufferUtils.base64Decode' }, + { privateAPIIdentifier: 'call.BufferUtils.base64Encode' }, + { privateAPIIdentifier: 'call.BufferUtils.hexEncode' }, + { privateAPIIdentifier: 'call.BufferUtils.isBuffer' }, + { privateAPIIdentifier: 'call.BufferUtils.toArrayBuffer' }, + { privateAPIIdentifier: 'call.BufferUtils.utf8Encode' }, + { privateAPIIdentifier: 'call.Utils.copy' }, + { privateAPIIdentifier: 'call.Utils.inspectError' }, + { privateAPIIdentifier: 'call.Utils.keysArray' }, + { privateAPIIdentifier: 'call.Utils.mixin' }, + { privateAPIIdentifier: 'call.Utils.toQueryString' }, + { privateAPIIdentifier: 'call.msgpack.decode' }, + { privateAPIIdentifier: 'call.msgpack.encode' }, + { privateAPIIdentifier: 'call.http.doUri', helper: 'getJWT' }, + ]; return usageDtos.filter( (usageDto) =>