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:
@@ -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 => {
|
||||
|
||||
Reference in New Issue
Block a user