adopted-ember-addons / ember-cli-flash

Simple, highly configurable flash messages for ember-cli
https://www.npmjs.com/package/ember-cli-flash
MIT License
355 stars 113 forks source link

remove requirement for providing a message #260

Closed st-h closed 6 years ago

st-h commented 6 years ago

fixes #259

I figured it would be reasonable to keep the message property required when preventDuplicates is enabled as that feature relies on the message string.

Please let me know or feel free to modify the added test, if you know of any better way to assert a thrown error than that:

assert.throws((() => {
  service.add({ });
}).message, 'Assertion Failed: The flash message cannot be empty when preventDuplicates is enabled.');
sbatson5 commented 6 years ago

Awesome! :shipit: