* remove newlines from datauri
* update test, remove decode
* support multiline datauris
* replace whitespace before checking isDataUri
removed multiline support from regex
* prependPrefix set default as empty string
* update
Sazerac is a library for data-driven tests, where a series of tests asserts that the return value of a function matches the expected value. It provides nice syntax for tightening this up.
https://hackernoon.com/sazerac-data-driven-testing-for-javascript-e3408ac29d8c
This converts our tests to use it, and replaces some similar home-grown code.
I fixed one bug I encountered along the way: mikec/sazerac#12.
Because I despise nitpicking stuff like indentation and spacing in pull request comments, I'd like to nudge forward our automated style checking, at least for new files being added.
I don't want to totally rewrite server.js just to get automated style checking… the blame tracking is just too useful. So let's it's just take care of that when we start splitting it out.
More discussion in #948.
- Except for social badges, omit logos by default (#983)
- Omit the logo from a social badge using the query string: `?logo=`
(#983)
- Opt in to named logos using the query string: `?logo=appveyor`
- Provide custom logo data as before: `?logo=data:image/png;base64,...`
- Rewrite badge data functions, with unit tests
Unit tests are covering the new code very well, though the underlying
functionality (logos) is untested.
Close#983