@@ -1058,6 +1058,15 @@ describe('RecordsServer', () => {
10581058 }
10591059
10601060 describe('GET /api/v2/procedures', () => {
1061+ function sortProceduresForSnapshot(body: any) {
1062+ return {
1063+ ...body,
1064+ procedures: [...body.procedures].sort((a, b) =>
1065+ a.name.localeCompare(b.name)
1066+ ),
1067+ };
1068+ }
1069+
10611070 it('should return the list of procedures', async () => {
10621071 const result = await server.handleHttpRequest(
10631072 httpGet('/api/v2/procedures', defaultHeaders)
@@ -1072,7 +1081,7 @@ describe('RecordsServer', () => {
10721081 headers: corsHeaders(defaultHeaders.origin),
10731082 });
10741083
1075- expect(body).toMatchSnapshot();
1084+ expect(sortProceduresForSnapshot( body) ).toMatchSnapshot();
10761085 });
10771086
10781087 it('should support procedures', async () => {
@@ -1089,7 +1098,7 @@ describe('RecordsServer', () => {
10891098 headers: corsHeaders(defaultHeaders.origin),
10901099 });
10911100
1092- expect(body).toMatchSnapshot();
1101+ expect(sortProceduresForSnapshot( body) ).toMatchSnapshot();
10931102 });
10941103
10951104 it('should include the recordName input schema for aiListChatModels', async () => {
0 commit comments