Skip to content

Commit

Permalink
add coverage
Browse files Browse the repository at this point in the history
Signed-off-by: ryjiang <[email protected]>
  • Loading branch information
shanghaikid committed Dec 20, 2024
1 parent 9b6b8e7 commit 56ccc09
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 1 deletion.
6 changes: 5 additions & 1 deletion milvus/utils/Format.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1122,6 +1122,10 @@ const convertArray = (arr: any[]): TemplateArrayValue => {
}

default:
throw new Error('Unsupported array type');
return {
string_data: {
data: arr,
},
};
}
};
6 changes: 6 additions & 0 deletions test/utils/Format.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1122,6 +1122,7 @@ describe('utils/format', () => {
[7, 8],
],
],
defaultArr: [undefined, undefined],
};

const formattedExprValues = formatExprValues(exprValues);
Expand Down Expand Up @@ -1228,6 +1229,11 @@ describe('utils/format', () => {
},
},
},
defaultArr: {
array_val: {
string_data: { data: [undefined, undefined] },
},
},
});
});
});

0 comments on commit 56ccc09

Please sign in to comment.