Skip to content

Commit eed1cbf

Browse files
committed
test(rest): the presentation-keys fixture declares a reference type, since the target is read through referenceTargetOf (#22739)
Claude-Session: https://claude.ai/code/session_01JfJfBUC3cQ6hhgm9MQK76T Co-authored-by: Claude <noreply@anthropic.com>
1 parent e6e2b42 commit eed1cbf

1 file changed

Lines changed: 8 additions & 3 deletions

File tree

‎packages/rest/src/export-format.test.ts‎

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -247,10 +247,15 @@ describe('buildFieldMetaMap — presentation keys only (#6536)', () => {
247247
'displayField', 'label', 'multiple', 'name', 'options', 'reference', 'type',
248248
];
249249

250-
/** One field declaring every retired constraint key alongside the presentation ones. */
250+
/**
251+
* One field declaring every retired constraint key alongside the presentation
252+
* ones. A reference type, because `reference` is read through the spec's
253+
* arbiter `referenceTargetOf` (#22739), which answers no target for a
254+
* non-reference type.
255+
*/
251256
const FIELD = {
252257
name: 'amount',
253-
type: 'number',
258+
type: 'lookup',
254259
label: '金额',
255260
reference: 'contracts',
256261
displayField: 'title',
@@ -282,7 +287,7 @@ describe('buildFieldMetaMap — presentation keys only (#6536)', () => {
282287
const meta = buildFieldMetaMap({ fields: { amount: FIELD } }).get('amount')!;
283288
expect(meta).toEqual({
284289
name: 'amount',
285-
type: 'number',
290+
type: 'lookup',
286291
label: '金额',
287292
options: undefined,
288293
reference: 'contracts',

0 commit comments

Comments
 (0)