(options: {
mapping?: Record<string, string | null | undefined>;
frontmatter?: Record<string, unknown>;
userFields?: Array<{ id?: string; key?: string }>;
} = {})
| 17 | } |
| 18 | |
| 19 | function createContext(options: { |
| 20 | mapping?: Record<string, string | null | undefined>; |
| 21 | frontmatter?: Record<string, unknown>; |
| 22 | userFields?: Array<{ id?: string; key?: string }>; |
| 23 | } = {}): TaskCardPropertyAccessContext { |
| 24 | return { |
| 25 | fieldMapper: { |
| 26 | lookupMappingKey: (propertyId: string) => options.mapping?.[propertyId] ?? null, |
| 27 | }, |
| 28 | settings: { |
| 29 | userFields: options.userFields ?? [], |
| 30 | }, |
| 31 | app: { |
| 32 | metadataCache: { |
| 33 | getCache: () => ({ frontmatter: options.frontmatter }), |
| 34 | }, |
| 35 | }, |
| 36 | }; |
| 37 | } |
| 38 | |
| 39 | describe("TaskCard property access", () => { |
| 40 | it("resolves mapped core properties before raw property IDs", () => { |
no outgoing calls
no test coverage detected