Skip to content

Commit

Permalink
fix: throw an error if fixture is not found
Browse files Browse the repository at this point in the history
  • Loading branch information
daviddias committed Feb 19, 2018
1 parent a735c25 commit a8907b9
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/fixtures.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,8 @@ module.exports = function loadFixtures (filePath, module) {
}
}

// @dignifiedquire: I know this is considered bad practice, but it makes testing life so much nicer!
// @dignifiedquire: I know this is considered bad practice (syncXhr), but it
// makes testing life so much nicer!
function syncXhr (filePath) {
const target = path.join('/base', filePath)

Expand All @@ -35,5 +36,7 @@ function syncXhr (filePath) {
}

return Buffer.from(res)
} else {
throw new Error('Could not get the Fixture')
}
}

0 comments on commit a8907b9

Please sign in to comment.