From 210dd14a10fe2a91b935319c1257c97ac35eb37f Mon Sep 17 00:00:00 2001 From: Oliver Hamlet Date: Wed, 10 Feb 2016 18:06:53 +0000 Subject: [PATCH] Remove unused Plugin.priorityString getter --- src/gui/html/js/plugin.js | 8 -------- src/tests/gui/html/js/test_plugin.js | 26 -------------------------- 2 files changed, 34 deletions(-) diff --git a/src/gui/html/js/plugin.js b/src/gui/html/js/plugin.js index 78fb2ec5..da7db3f9 100644 --- a/src/gui/html/js/plugin.js +++ b/src/gui/html/js/plugin.js @@ -232,14 +232,6 @@ return rowData; } - get priorityString() { - if (this.priority === 0) { - return ''; - } - - return this.priority.toString(); - } - _dispatchCardContentChangeEvent() { document.dispatchEvent(new CustomEvent('loot-plugin-card-content-change', { detail: { pluginId: this.id }, diff --git a/src/tests/gui/html/js/test_plugin.js b/src/tests/gui/html/js/test_plugin.js index 76093c92..9044361e 100644 --- a/src/tests/gui/html/js/test_plugin.js +++ b/src/tests/gui/html/js/test_plugin.js @@ -301,32 +301,6 @@ describe('Plugin', () => { }); }); - describe('#priorityString', () => { - it('should return an empty string if priority is undefined', () => { - const plugin = new loot.Plugin({ name: 'test' }); - - plugin.priorityString.should.equal(''); - }); - - it('should return an empty string if priority is zero', () => { - const plugin = new loot.Plugin({ - name: 'test', - priority: 0, - }); - - plugin.priorityString.should.equal(''); - }); - - it('should return priority value as string if non zero', () => { - const plugin = new loot.Plugin({ - name: 'test', - priority: -50, - }); - - plugin.priorityString.should.equal('-50'); - }); - }); - describe('#messages', () => { let handleEvent;