Skip to content

Commit

Permalink
test
Browse files Browse the repository at this point in the history
  • Loading branch information
fuyan2024 committed Jan 20, 2025
1 parent 54789ce commit 73c224a
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -106,14 +106,7 @@ const memoizeState = memoizeOne(
})
);

const isCallEqual = (newArgs: any[], lastArgs: any[]): boolean => {
return JSON.stringify(newArgs) === JSON.stringify(lastArgs);
};

const memoizeCalls = memoizeOne(
(call?: CallState): { [key: string]: CallState } => (call ? { [call.id]: call } : {}),
isCallEqual
);
const memoizeCalls = memoizeOne((call?: CallState): { [key: string]: CallState } => (call ? { [call.id]: call } : {}));

const adaptCompositeState = (compositeState: CallAdapterState): CallClientState => {
return memoizeState(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ import type {
import type { CallKind, DominantSpeakersInfo, ParticipantRole } from '@azure/communication-calling';
import type { ParticipantCapabilities } from '@azure/communication-calling';
import { CallState, CapabilitiesFeatureState } from '@internal/calling-stateful-client';
import { v4 as uuidv4 } from 'uuid';

const SERVER_URL = 'http://localhost';
const APP_DIR = path.join(__dirname, '../../../app/call');
Expand Down Expand Up @@ -72,7 +73,7 @@ export function defaultMockCallAdapterState(
isLocalPreviewMicrophoneEnabled: true,
page: callEndReasonSubCode ? 'leftCall' : 'call',
call: {
id: 'call1',
id: uuidv4(),

kind: 'Call' as CallKind,
callerInfo: { displayName: 'caller', identifier: { kind: 'communicationUser', communicationUserId: '1' } },
Expand Down

0 comments on commit 73c224a

Please sign in to comment.