@devries-cameron20 / composio Mirror · read-only / commits / 47a81faf7
Fork 0

Composio powers 1000+ toolkits, tool search, context management, authentication, and a sandboxed workbench to help you build AI agents that turn intent into action.

Mirrored from https://github.com/Camo67/composio.git

Synced Nov 22, 13:15 UTC

test(ts/e2e): fix typecheck

jkomyno committed Jan 27, 2026 at 02:07 UTC 47a81faf7be86b9e22011e45eca66a5248726776
1 file changed +16 -1
ts/e2e-tests/runtimes/node/json-schema-to-zod-v3/e2e.test.ts
+16 -1
@@ -116,9 +116,11 @@ describe('json-schema-to-zod with Zod v3', () => {
116 };
117
118 const zodSchema = jsonSchemaToZod(schema);
119 + // @ts-expect-error Type instantiation is excessively deep and possibly infinite.
120 const convertedBack = zodToJsonSchema(zodSchema, { target: 'jsonSchema7' });
120 -
121 + // @ts-expect-error Property 'additionalProperties' does not exist on type.
122 expect(convertedBack.additionalProperties).toBe(true);
123 + // @ts-expect-error Property 'type' does not exist on type
124 expect(convertedBack.type).toBe('object');
125
126 expect(zodSchema.parse({})).toEqual({});
@@ -139,8 +141,11 @@ describe('json-schema-to-zod with Zod v3', () => {
141 const zodSchema = jsonSchemaToZod(schema);
142 const convertedBack = zodToJsonSchema(zodSchema, { target: 'jsonSchema7' });
143
144 + // @ts-expect-error Property 'additionalProperties' does not exist on type.
145 expect(convertedBack.additionalProperties).toBe(true);
146 + // @ts-expect-error Type instantiation is excessively deep and possibly infinite.
147 expect(convertedBack.properties).toBeDefined();
148 + // @ts-expect-error Property 'required' does not exist on type
149 expect(convertedBack.required).toEqual(['name']);
150
151 expect(zodSchema.parse({ name: 'John' })).toEqual({ name: 'John' });
@@ -163,9 +168,12 @@ describe('json-schema-to-zod with Zod v3', () => {
168 // zod-to-json-schema may convert z.object({}).strict() to { not: {} }
169 // which is semantically equivalent to additionalProperties: false
170 const additionalPropsValid =
171 + // @ts-expect-error Property 'additionalProperties' does not exist on type.
172 convertedBack.additionalProperties === false ||
173 + // @ts-expect-error Property 'not' does not exist on type.
174 (convertedBack.not && typeof convertedBack.not === 'object');
175 expect(additionalPropsValid).toBe(true);
176 + // @ts-expect-error Property 'type' does not exist on type.
177 expect(convertedBack.type).toBe('object');
178
179 expect(zodSchema.parse({})).toEqual({});
@@ -184,7 +192,9 @@ describe('json-schema-to-zod with Zod v3', () => {
192 const zodSchema = jsonSchemaToZod(schema);
193 const convertedBack = zodToJsonSchema(zodSchema, { target: 'jsonSchema7' });
194
195 + // @ts-expect-error Property 'additionalProperties' does not exist on type.
196 expect(convertedBack.additionalProperties).toBe(false);
197 + // @ts-expect-error Property 'properties' does not exist on type.
198 expect(convertedBack.properties).toBeDefined();
199
200 expect(zodSchema.parse({ name: 'John' })).toEqual({ name: 'John' });
@@ -203,7 +213,9 @@ describe('json-schema-to-zod with Zod v3', () => {
213 const zodSchema = jsonSchemaToZod(schema);
214 const convertedBack = zodToJsonSchema(zodSchema, { target: 'jsonSchema7' });
215
216 + // @ts-expect-error Property 'additionalProperties' does not exist on type.
217 expect(convertedBack.additionalProperties).toEqual({ type: 'number' });
218 + // @ts-expect-error Property 'properties' does not exist on type.
219 expect(convertedBack.properties).toBeDefined();
220
221 expect(zodSchema.parse({ name: 'John' })).toEqual({ name: 'John' });
@@ -236,8 +248,11 @@ describe('json-schema-to-zod with Zod v3', () => {
248 const zodSchema = jsonSchemaToZod(schema);
249 const convertedBack = zodToJsonSchema(zodSchema, { target: 'jsonSchema7' });
250
251 + // @ts-expect-error Property 'additionalProperties' does not exist on type.
252 expect(convertedBack.additionalProperties).toEqual({ type: 'string' });
253 + // @ts-expect-error Property 'properties' does not exist on type.
254 expect((convertedBack.properties as Record<string, unknown>)?.strictChild).toBeDefined();
255 + // @ts-expect-error Property 'properties' does not exist on type.
256 expect((convertedBack.properties as Record<string, unknown>)?.flexibleChild).toBeDefined();
257
258 const validData = {