Dev: Table log

This commit is contained in:
surunzi
2017-01-16 16:15:21 +08:00
parent 1217cb918c
commit 1c83329564
4 changed files with 81 additions and 2 deletions

View File

@@ -127,6 +127,12 @@ describe('table', function ()
expect($tool.find('.eruda-table')).not.toContainElement('table');
});
it('sort keys', function ()
{
tool.clear().table([{a: 1}, {d: 2, a: 2}, {c: 1}]);
expect($tool.find('.eruda-table thead tr')).toContainHtml('<th>(index)</th><th>a</th><th>c</th><th>d</th>');
});
it('basic', function ()
{
tool.clear().table([{test: 1}, {test: 2, test2: 3}]);