mirror of
https://github.com/liriliri/eruda.git
synced 2026-03-20 09:38:37 +08:00
Add: Eruda version info
This commit is contained in:
@@ -26,5 +26,9 @@ export default [
|
||||
</tbody>
|
||||
</table>`
|
||||
|
||||
},
|
||||
{
|
||||
name: 'About',
|
||||
val: '<a href="https://github.com/liriliri/eruda" target="_blank">Eruda v' + VERSION + '</a>'
|
||||
}
|
||||
];
|
||||
|
||||
36
test/info.js
36
test/info.js
@@ -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);
|
||||
});
|
||||
});
|
||||
Reference in New Issue
Block a user