Team Ai
Datasetpublic

Brunobkr/llama.cpp_AlgMor24_github

ΩFFFΣLLIa • llama.cpp • AlgMor24 ██████╗ ███████╗███████╗███████╗██╗ ██╗ ██╗ █████╗ ██╔═══██╗██╔════╝██╔════╝██╔════╝██║ ██║ ██║██╔══██╗ ██║ ██║█████╗ █████╗ █████╗ ██║ ██║ ██║███████║ ██║ ██║██╔══╝ ██╔══╝ ██╔══╝ ██║ ██║ ██║██╔══██║ ╚██████╔╝██║ ██║ ███████╗███████╗███████╗██║██║ ██║ ╚═════╝ ╚═╝ ╚═╝ ╚══════╝╚══════╝╚══════╝╚═╝╚═╝ ╚═╝ High-Performance LLM / VLM Inference & Autonomous Agentic Ecosystem… See the full description on the dataset page: https://huggingface.co/datasets/Brunobkr/llama.cpp_AlgMor24_github.

sourceHugging Faceupdated 2mo agoView on Hugging Face
0likes3.1kdownloads
extend.test.ts60 linesDownload Raw Back to tests
1import { expect, test } from "vitest";2import * as z from "zod/v4";3 4test("safeExtend chaining preserves and overrides properties", () => {5  const schema1 = z.object({6    email: z.string(),7  });8 9  const schema2 = schema1.safeExtend({10    email: schema1.shape.email.check(z.email()),11  });12 13  const schema3 = schema2.safeExtend({14    email: schema2.shape.email.or(z.literal("")),15  });16 17  schema3.parse({ email: "test@example.com" });18});19 20test("extend with constructor field in shape", () => {21  const baseSchema = z.object({22    name: z.string(),23  });24 25  const extendedSchema = baseSchema.extend({26    constructor: z.string(),27    age: z.number(),28  });29 30  const result = extendedSchema.parse({31    name: "John",32    constructor: "Person",33    age: 30,34  });35 36  expect(result).toEqual({37    name: "John",38    constructor: "Person",39    age: 30,40  });41 42  const testCases = [43    { name: "Test", constructor: 123, age: 25 },44    { name: "Test", constructor: null, age: 25 },45    { name: "Test", constructor: true, age: 25 },46    { name: "Test", constructor: {}, age: 25 },47  ];48 49  for (const testCase of testCases) {50    const anyConstructorSchema = baseSchema.extend({51      constructor: z.any(),52      age: z.number(),53    });54 55    expect(() => anyConstructorSchema.parse(testCase)).not.toThrow();56    const parsed = anyConstructorSchema.parse(testCase);57    expect(parsed).toEqual(testCase);58  }59});60 
Brunobkr/llama.cpp_AlgMor24_github · Team Ai