Skip to content

Commit

Permalink
Make error message ascertion more flexible
Browse files Browse the repository at this point in the history
  • Loading branch information
katspaugh authored May 11, 2024
1 parent a8c01da commit 52aface
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions cypress/e2e/abort.cy.js
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ describe('WaveSurfer abort handling tests', () => {
// catch load error
win.wavesurfer.load('../../examples/audio/demo.wav').catch((e) => {
expect(e.name).to.equal('AbortError')
expect(e.message).to.equal('The user aborted a request.')
expect(e.message).to.match(/aborted/)
resolve()
})

Expand All @@ -64,7 +64,7 @@ describe('WaveSurfer abort handling tests', () => {
// listening wavesurfer emit error event
win.wavesurfer.on('error', (e) => {
expect(e.name).to.equal('AbortError')
expect(e.message).to.equal('The user aborted a request.')
expect(e.message).to.match(/aborted/)
resolve()
})
})
Expand Down

0 comments on commit 52aface

Please sign in to comment.