Fix "drafts are reloaded when reload-drafts fired" test

This fixes the test under Polymer 2 with legacy undefined
check switched off.

Change-Id: I1d84c4e9ab15c7d8199017615b8d6cb0444c2239
This commit is contained in:
Paladox none
2019-10-14 14:35:19 +00:00
parent dd7ba649da
commit 0ddc8af097

View File

@@ -345,8 +345,10 @@ limitations under the License.
],
};
setup(() => {
// Fake computeDraftCount as its required for ChangeComments,
// see gr-comment-api#reloadDrafts.
reloadStub = sandbox.stub(element.$.commentAPI, 'reloadDrafts')
.returns(Promise.resolve({drafts}));
.returns(Promise.resolve({drafts, computeDraftCount: () => 1}));
});
test('drafts are reloaded when reload-drafts fired', done => {