import { type Expect, type HasAllProperties } from 'twenty-shared/testing'; import { describe, expect, it } from 'vitest'; import { CoreApiClient } from '../../core/generated/index'; import { type TwentyGeneratedClientOptions } from '../twenty-client-template'; type StubOptions = NonNullable[0]>; type GeneratedOptions = NonNullable; type _StubHasEveryGeneratedOption = Expect< HasAllProperties >; type _GeneratedHasEveryStubOption = Expect< HasAllProperties >; describe('CoreApiClient stub', () => { it('accepts the full generated option set and still refuses to run', () => { expect( () => new CoreApiClient({ url: 'https://example.test/graphql', headers: { Authorization: 'Bearer token' }, fetcher: async () => ({}), fetch: globalThis.fetch, batch: false, runAs: 'application', }), ).toThrow('CoreApiClient was not generated.'); }); });