Skip to content

Commit b047bc6

Browse files
committed
chore: type errors
1 parent 93d525f commit b047bc6

1 file changed

Lines changed: 12 additions & 13 deletions

File tree

test/unit/contentSignal.test.ts

Lines changed: 12 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -234,8 +234,7 @@ CONTENT-SIGNAL: ai-input=no
234234
comment: [],
235235
contentSignal: 'ai-train=no',
236236
}
237-
// @ts-expect-error - testing runtime normalization
238-
const normalized = normalizeGroup(group)
237+
const normalized = normalizeGroup(group as any)
239238
expect(normalized.contentSignal).toEqual(['ai-train=no'])
240239
})
241240

@@ -246,9 +245,9 @@ CONTENT-SIGNAL: ai-input=no
246245
disallow: [],
247246
comment: [],
248247
contentSignal: {
249-
'ai-train': 'no',
250-
'search': 'yes',
251-
'ai-input': 'no',
248+
'ai-train': 'no' as const,
249+
'search': 'yes' as const,
250+
'ai-input': 'no' as const,
252251
},
253252
}
254253
const normalized = normalizeGroup(group)
@@ -262,8 +261,8 @@ CONTENT-SIGNAL: ai-input=no
262261
disallow: [],
263262
comment: [],
264263
contentUsage: {
265-
'bots': 'y',
266-
'train-ai': 'n',
264+
'bots': 'y' as const,
265+
'train-ai': 'n' as const,
267266
},
268267
}
269268
const normalized = normalizeGroup(group)
@@ -277,7 +276,7 @@ CONTENT-SIGNAL: ai-input=no
277276
disallow: [],
278277
comment: [],
279278
contentSignal: {
280-
'ai-train': 'no',
279+
'ai-train': 'no' as const,
281280
},
282281
}
283282
const normalized = normalizeGroup(group)
@@ -392,19 +391,19 @@ CONTENT-SIGNAL: ai-input=no
392391
disallow: [],
393392
comment: [],
394393
contentUsage: {
395-
'bots': 'y',
396-
'train-ai': 'n',
394+
'bots': 'y' as const,
395+
'train-ai': 'n' as const,
397396
},
398397
contentSignal: {
399-
'ai-train': 'no',
400-
'search': 'yes',
398+
'ai-train': 'no' as const,
399+
'search': 'yes' as const,
401400
},
402401
},
403402
],
404403
sitemaps: [],
405404
}
406405

407-
const normalized = normalizeGroup(robotsData.groups[0])
406+
const normalized = normalizeGroup(robotsData.groups[0]!)
408407
const generated = generateRobotsTxt({ groups: [normalized], sitemaps: [] })
409408
expect(generated).toContain('Content-Usage: bots=y, train-ai=n')
410409
expect(generated).toContain('Content-Signal: ai-train=no, search=yes')

0 commit comments

Comments
 (0)