yui/yui3 — pull request #1310 by apipkin (2013-10-11 18:34:16+00:00)
Title: [DT] Clean up and coverage for messages.js

A little clean up to `messages.js` to minimize the number of `getClassName`.

Add some much needed tests for coverage. Branches that are not covered are for house keeping, but should never be reached.

```
[14:31][apipkin:~/Projects/yui3/src/datatable(dt-message)]$ yogi test --coverage
yogi [info] using yogi@0.1.11 on node@0.10.15
yogi [info] using module: datatable
yogi [info] prepping grover tests
yogi [info] adding tests route
yogi [info] launching xdr server on port 5001
yogi [info] listening on: http://127.0.0.1:5000
yogi [info] turning on coverage support in grover
Starting Grover on 12 files with PhantomJS@1.9.2
Running 15 concurrent tests at a time.
✔ [DataTable: Column Widths]: Passed: 8 Failed: 0 Total: 8 (ignored 0) (0.148 seconds) 86%
✔ [DataTable: Base]: Passed: 17 Failed: 0 Total: 17 (ignored 0) (0.333 seconds) 94%
✔ [DataTable: Core]: Passed: 31 Failed: 0 Total: 34 (ignored 3) (0.457 seconds) 92%
✔ [DataTable: Head]: Passed: 8 Failed: 0 Total: 8 (ignored 0) (0.158 seconds) 98%
✔ [DataTable: Sortable]: Passed: 13 Failed: 0 Total: 13 (ignored 0) (0.261 seconds) 83%
✔ [DataTable: Message]: Passed: 14 Failed: 0 Total: 14 (ignored 0) (0.244 seconds) 100%
✔ [DataTable: Body]: Passed: 49 Failed: 0 Total: 52 (ignored 3) (0.813 seconds) 86%
✔ [DataTable: Table]: Passed: 34 Failed: 0 Total: 35 (ignored 1) (0.524 seconds) 100%
✔ [DataTable: Paginator]: Passed: 11 Failed: 0 Total: 11 (ignored 0) (0.456 seconds) 95%
✔ [Datatable: Scroll]: Passed: 23 Failed: 0 Total: 23 (ignored 0) (1.062 seconds) 77%
✔ [DataTable: Mutable]: Passed: 98 Failed: 0 Total: 98 (ignored 0) (1.253 seconds) 97%
✔ [DataTable: highlight]: Passed: 5 Failed: 0 Total: 5 (ignored 0) (6.075 seconds) 100%

---------------------------------+-----------+-----------+-----------+-----------+
File | % Stmts |% Branches | % Funcs | % Lines |
---------------------------------+-----------+-----------+-----------+-----------+
datatable-base/ | 94.44 | 74.29 | 100 | 94.44 |
datatable-base.js | 94.44 | 74.29 | 100 | 94.44 |
datatable-body/ | 87.18 | 73.21 | 93.33 | 86.96 |
datatable-body.js | 87.18 | 73.21 | 93.33 | 86.96 |
datatable-column-widths/ | 86.05 | 71.43 | 88.89 | 86.05 |
datatable-column-widths.js | 86.05 | 71.43 | 88.89 | 86.05 |
datatable-core/ | 92.68 | 82.27 | 100 | 92.68 |
datatable-core.js | 92.68 | 82.27 | 100 | 92.68 |
datatable-head/ | 98.98 | 89.29 | 100 | 98.98 |
datatable-head.js | 98.98 | 89.29 | 100 | 98.98 |
datatable-highlight/ | 100 | 100 | 100 | 100 |
datatable-highlight.js | 100 | 100 | 100 | 100 |
datatable-message/ | 100 | 79.31 | 100 | 100 |
datatable-message.js | 100 | 79.31 | 100 | 100 |
datatable-mutable/ | 97 | 88.89 | 100 | 97 |
datatable-mutable.js | 97 | 88.89 | 100 | 97 |
datatable-paginator/ | 95.52 | 88.37 | 97.67 | 95.52 |
datatable-paginator.js | 95.52 | 88.37 | 97.67 | 95.52 |
datatable-scroll/ | 77.78 | 60.76 | 80.39 | 77.78 |
datatable-scroll.js | 77.78 | 60.76 | 80.39 | 77.78 |
datatable-sort/ | 83.8 | 70.39 | 91.3 | 83.8 |
datatable-sort.js | 83.8 | 70.39 | 91.3 | 83.8 |
datatable-table/ | 100 | 84.09 | 100 | 100 |
datatable-table.js | 100 | 84.09 | 100 | 100 |
---------------------------------+-----------+-----------+-----------+-----------+
All files | 89.9 | 75.99 | 94.14 | 89.88 |
---------------------------------+-----------+-----------+-----------+-----------+

=============================== Coverage summary ===============================
Statements : 89.9% ( 1380/1535 )
Branches : 75.99% ( 899/1183 )
Functions : 94.14% ( 257/273 )
Lines : 89.88% ( 1376/1531 )
================================================================================
----------------------------------------------------------------
✔ [Total]: Passed: 311 Failed: 0 Total: 318 (ignored 7) (11.784 seconds)
[Grover Execution Timer] 10.595 seconds
yogi [info] grover tests complete
```