ember-inline-svg icon indicating copy to clipboard operation
ember-inline-svg copied to clipboard

Missing Test Cases: Error Handling for Failing Optimizations and Missing .svg Files

Open buschtoens opened this issue 10 years ago • 1 comments

If I would know how, I would have written these tests myself, but I couldn't find any resources on writing tests for error / exception handling with broccoli. So the untested cases we have are:

  • [ ] Test that ember-inline-svg throws an error during build time, if an SVG optimization has failed.
  • [ ] Test that ember-inline-svg emits an "empty" svg.js, if there are no .svg files present.

Another case that is untested:

  • [ ] Throw an error, if the handlebars helper could not find the coresponding .svg. StackOverflow
    • [x] Refactor tests

This one is easy to fix tho. Expect a PR soon. Edit: Not so easy as I thought. Here be StackOverflow.

buschtoens avatar Jan 21 '15 04:01 buschtoens

Good question, @rwjblue any suggestions?

rlivsey avatar Jan 21 '15 11:01 rlivsey