/** * Copyright (c) 2026, Salesforce, Inc., * All rights reserved. * For full license text, see the LICENSE.txt file */ import { type ObjectInfoResult } from "../../lib/object-info.js"; /** * Build a fully-typed `ObjectInfoResult` for tests, with sensible defaults that * any field can override. Use this instead of `{...} as never` seeds so the * compiler keeps checking field names and types — if `ObjectInfoResult` gains a * required field or one is renamed, callers fail to compile instead of silently * exercising a shape production code would never see. */ export function makeObjectInfo(overrides: Partial = {}): ObjectInfoResult { return { apiName: "Account", label: "Account", labelPlural: "Accounts", createable: true, deletable: true, updateable: true, queryable: true, searchable: true, custom: false, keyPrefix: "001", nameFields: ["Name"], defaultRecordTypeId: null, fields: [], childRelationships: [], recordTypeInfos: [], picklists: [], fetchedAt: new Date().toISOString(), ...overrides, }; }