Skip to content

Commit bb28c9b

Browse files
committed
Minor tweak to make test code more idiomatic
1 parent aac1959 commit bb28c9b

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

src/server/index.test.ts

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -606,11 +606,11 @@ describe("Server.tool", () => {
606606
name: z.string(),
607607
value: z.number(),
608608
},
609-
async (args) => ({
609+
async ({ name, value }) => ({
610610
content: [
611611
{
612612
type: "text",
613-
text: `${args.name}: ${args.value}`,
613+
text: `${name}: ${value}`,
614614
},
615615
],
616616
}),
@@ -705,11 +705,11 @@ describe("Server.tool", () => {
705705
name: z.string(),
706706
value: z.number(),
707707
},
708-
async (args) => ({
708+
async ({ name, value }) => ({
709709
content: [
710710
{
711711
type: "text",
712-
text: `${args.name}: ${args.value}`,
712+
text: `${name}: ${value}`,
713713
},
714714
],
715715
}),
@@ -791,11 +791,11 @@ describe("Server.tool", () => {
791791
{
792792
input: z.string(),
793793
},
794-
async (args) => ({
794+
async ({ input }) => ({
795795
content: [
796796
{
797797
type: "text",
798-
text: `Processed: ${args.input}`,
798+
text: `Processed: ${input}`,
799799
},
800800
],
801801
}),

0 commit comments

Comments
 (0)