Skip to content

Commit

Permalink
[UTS] Add some exclusions to private API reporting
Browse files Browse the repository at this point in the history
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).
  • Loading branch information
lawrence-forooghian committed Jul 25, 2024
1 parent 8e37ad0 commit 8d162a0
Showing 1 changed file with 18 additions and 4 deletions.
22 changes: 18 additions & 4 deletions scripts/processPrivateApiData/exclusions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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) =>
Expand Down

0 comments on commit 8d162a0

Please sign in to comment.