79320914

Date: 2024-12-31 23:06:59
Score: 1.5
Natty:
Report link

Intercept the general pattern for the avatars, find out which specific avatar from the URL then apply the fixture dynamically.

Since you control the mocks in /images you don't need base64.

cy.intercept('**/avatars/default/*', (req) => {
  const img = req.url.split('/').at(-1)
  req.reply({
    fixture: `../../images/${img}`
  })
})

enter image description here

Reasons:
  • Probably link only (1):
  • Has code block (-0.5):
  • Low reputation (1):
Posted by: Niles P