From deb07670443d0e562959d463317208bb8524e174 Mon Sep 17 00:00:00 2001 From: Viktar Donich Date: Wed, 29 Mar 2017 15:29:08 -0700 Subject: [PATCH] Fix test suite failure, and some lint Change-Id: Ia7054459ca7f8a252c9e54beb1b8b380ab2ddba6 --- polygerrit-ui/app/elements/gr-app_test.html | 12 ++++-------- .../plugins/gr-plugin-host/gr-plugin-host.js | 2 +- 2 files changed, 5 insertions(+), 9 deletions(-) diff --git a/polygerrit-ui/app/elements/gr-app_test.html b/polygerrit-ui/app/elements/gr-app_test.html index 91fccd7c5c..ca0c4fb55e 100644 --- a/polygerrit-ui/app/elements/gr-app_test.html +++ b/polygerrit-ui/app/elements/gr-app_test.html @@ -18,7 +18,7 @@ limitations under the License. gr-app - + @@ -90,13 +90,9 @@ limitations under the License. }); test('passes config to gr-plugin-host', function(done) { - var config = {plugin: {}}; - element.$.restAPI.getConfig.restore(); - sandbox.stub( - element.$.restAPI, 'getConfig').returns(Promise.resolve(config)); - element.attached(); - flush(function() { - assert.strictEqual(element.$.plugins.config, config.plugin); + element.$.restAPI.getConfig.lastCall.returnValue.then(function(config) { + var pluginConfig = config.plugin; + assert.deepEqual(element.$.plugins.config, pluginConfig); done(); }); }); diff --git a/polygerrit-ui/app/elements/plugins/gr-plugin-host/gr-plugin-host.js b/polygerrit-ui/app/elements/plugins/gr-plugin-host/gr-plugin-host.js index f13ab5b3ae..ccfe604dbd 100644 --- a/polygerrit-ui/app/elements/plugins/gr-plugin-host/gr-plugin-host.js +++ b/polygerrit-ui/app/elements/plugins/gr-plugin-host/gr-plugin-host.js @@ -20,7 +20,7 @@ properties: { config: { type: Object, - observer: "_configChanged", + observer: '_configChanged', }, },