Since I decided to preen mocha and chai, we can no longer generate the
concat file list from the preen config. We must instead explicitly list
the modules we want to concatenate. I placed this config in bower.json
so that most of the time, we won't need to change the Gruntfile.
Also added a concatenation task for test page dependencies.
To components. Because tab-completion works better when there aren't two
things starting with bower, and shorter names are nicer to deal with in
general.
Set up grunt with tasks for:
* preen - deletes unused files from bower_components, configured in
bower.json
* concat - concatenates preened bower components, configured
automagically from the preen config
It's worth noting that this setup assumes the order of files within a
package doesn't matter. This is usually true since we often include only
one file from the package.
Moved all test code into /test. Renamed test.js to crypto_test.js.
(Let's try to keep test files topical.) Merged test_views.html and
test.html into a single test/index.html.
Todo: use Grunt to generate test/index.html from index.html and files
found in /test. Also, write more tests.
Also,
* moved fetch out of the list view
* removed unused #last() function
* put test setup lines in their own tiny file.
* added data-cover to view script tags for code coveage reports.
ERHMAGERRRD testing frameworks are so the best. Removed all our custom
code for ensuring test exclusivity and doneness and isolating callbacks
and everything. mocha does it all for us, and makes it pretty.
Also rather than return a long chain of promises that eventually resolve
to truthiness, we now use chai to make assertions about what is good and
right in the world.
Recommended reading:
https://visionmedia.github.io/mochahttp://chaijs.com/api/assert/