Skip to content

Commit

Permalink
++
Browse files Browse the repository at this point in the history
  • Loading branch information
littleGnAl committed Dec 26, 2023
1 parent 36c7479 commit 90667e9
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
12 changes: 6 additions & 6 deletions src/__tests__/utils/iris_utils.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@ import {
Variable,
} from '@agoraio-extensions/cxx-parser';

import { irisApiType } from '../../index';
import { irisApiId } from '../../index';

describe('irisApiType', () => {
describe('irisApiId', () => {
it('return full api type with hash code', () => {
let myClass = { name: 'MyClass' } as Clazz;
let mf = {
Expand All @@ -20,7 +20,7 @@ describe('irisApiType', () => {
],
} as MemberFunction;

let apiType = irisApiType(myClass, mf);
let apiType = irisApiId(myClass, mf);

expect(apiType).toBe('MYCLASS_MYFUNC_3766a1b9');
});
Expand All @@ -39,7 +39,7 @@ describe('irisApiType', () => {
],
} as MemberFunction;

let apiType = irisApiType(myClass, mf);
let apiType = irisApiId(myClass, mf);

expect(apiType).toBe('MYCLASS_MYFUNC_67d36c93');
});
Expand All @@ -57,7 +57,7 @@ describe('irisApiType', () => {
],
} as MemberFunction;

let apiType = irisApiType(myClass, mf, { toUpperCase: false });
let apiType = irisApiId(myClass, mf, { toUpperCase: false });

expect(apiType).toBe('MyClass_MyFunc_3766a1b9');
});
Expand All @@ -75,7 +75,7 @@ describe('irisApiType', () => {
],
} as MemberFunction;

let apiType = irisApiType(myClass, mf, {
let apiType = irisApiId(myClass, mf, {
withClassName: false,
withFuncName: false,
});
Expand Down
2 changes: 1 addition & 1 deletion src/utils/iris_utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import { Clazz, MemberFunction } from '@agoraio-extensions/cxx-parser';
* @param returnHashCodeOnly Only return the hash code string
* @returns
*/
export function irisApiType(
export function irisApiId(
clazz: Clazz,
mf: MemberFunction,
options?: {
Expand Down

0 comments on commit 90667e9

Please sign in to comment.