Skip to content

Commit

Permalink
Fix test.
Browse files Browse the repository at this point in the history
  • Loading branch information
William Chou committed May 19, 2021
1 parent 1690cee commit a608ede
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions extensions/amp-list/0.1/test/test-amp-list.js
Original file line number Diff line number Diff line change
Expand Up @@ -770,7 +770,7 @@ describes.repeated(
it('should attemptChangeHeight initial content', async () => {
const initialContent = doc.createElement('div');
initialContent.setAttribute('role', 'list');
initialContent.style.height = '1337px';
initialContent.setAttribute('style', 'height: 123px');

// Initial content must be set before buildCallback(), so use
// a new test AmpList instance.
Expand All @@ -785,11 +785,12 @@ describes.repeated(
// content, once to resize to rendered contents.
listMock
.expects('attemptChangeHeight')
.withExactArgs(1337)
.withExactArgs(123)
.returns(Promise.resolve())
.twice();

const itemElement = doc.createElement('div');
itemElement.setAttribute('style', 'height: 123px');
expectFetchAndRender(DEFAULT_FETCHED_DATA, [itemElement]);
await list.layoutCallback();
});
Expand Down

0 comments on commit a608ede

Please sign in to comment.