Add: Eruda version info

This commit is contained in:
surunzi
2017-11-05 22:39:45 +08:00
parent 03468823c5
commit 7686bfd695
2 changed files with 23 additions and 17 deletions

View File

@@ -26,5 +26,9 @@ export default [
</tbody>
</table>`
},
{
name: 'About',
val: '<a href="https://github.com/liriliri/eruda" target="_blank">Eruda v' + VERSION + '</a>'
}
];

View File

@@ -19,27 +19,29 @@ describe('info', function ()
{
expect($tool.find('.eruda-content').eq(2)).toContainText(window.innerWidth);
});
it('about', function ()
{
expect($tool.find('.eruda-content').eq(3)).toHaveText(/Eruda v[\d.]+/);
});
});
describe('basic', function ()
it('clear', function ()
{
it('clear', function ()
{
tool.clear();
expect($tool.find('li')).toHaveLength(0);
});
tool.clear();
expect($tool.find('li')).toHaveLength(0);
});
it('add', function ()
{
tool.add('test', 'eruda');
expect($tool.find('.eruda-title')).toContainText('test');
expect($tool.find('.eruda-content')).toContainText('eruda');
});
it('add', function ()
{
tool.add('test', 'eruda');
expect($tool.find('.eruda-title')).toContainText('test');
expect($tool.find('.eruda-content')).toContainText('eruda');
});
it('remove', function ()
{
tool.remove('test');
expect($tool.find('li')).toHaveLength(0);
});
it('remove', function ()
{
tool.remove('test');
expect($tool.find('li')).toHaveLength(0);
});
});