Skip to content

Commit 99794a8

Browse files
test(core): split absent-params and _meta-strip into separate tests
1 parent 647fcdc commit 99794a8

File tree

1 file changed

+12
-1
lines changed

1 file changed

+12
-1
lines changed

packages/core/test/shared/threeArgHandlers.test.ts

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,18 @@ describe('setRequestHandler — three-arg paramsSchema form', () => {
4242
);
4343
});
4444

45-
it('normalizes absent params to {} and strips _meta', async () => {
45+
it('normalizes absent params to {}', async () => {
46+
const { a, b } = await makePair();
47+
let seen: unknown;
48+
b.setRequestHandler('acme/noop', z.object({}).strict(), p => {
49+
seen = p;
50+
return {};
51+
});
52+
await a.request({ method: 'acme/noop' }, z.object({}));
53+
expect(seen).toEqual({});
54+
});
55+
56+
it('strips _meta before validating against paramsSchema', async () => {
4657
const { a, b } = await makePair();
4758
let seen: unknown;
4859
b.setRequestHandler('acme/noop', z.object({}).strict(), p => {

0 commit comments

Comments
 (0)