您最多选择25个主题 主题必须以字母或数字开头,可以包含连字符 (-),并且长度不得超过35个字符
 
 
 
 

12 行
461 B

  1. import path from 'node:path'
  2. export function matchesSceneScreenshotAttachment(file, attachment) {
  3. const stem = file.replace(/\.[^.]+$/, '')
  4. const attachmentFile = path.basename(String(attachment.path || '').replaceAll('\\', '/'))
  5. return attachment.name === file || attachment.name === stem || attachmentFile === file
  6. }
  7. export function isSceneUnitProof(proof) {
  8. return ['api', 'unit', 'contract', 'integration', 'manual-visual'].includes(proof.kind)
  9. }