Skip to content

Commit

Permalink
Failing test for destroy not called on items in each
Browse files Browse the repository at this point in the history
Failing test for emberjs/ember.js#18855

Fix destroyCount for last assert
  • Loading branch information
scottmessinger committed Apr 29, 2020
1 parent bec3f43 commit 19f1962
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion packages/@glimmer/integration-tests/test/updating-test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1893,8 +1893,11 @@ class UpdatingTest extends RenderTest {
this.rerender({ list: ['initial', 'update'] });
this.assertHTML(`<div>initial</div><div>update</div>`);

this.rerender({ list: ['initial'] });
assert.equal(destroyCount, 1, 'destroy was called for removed item');

this.rerender({ list: [] });
assert.equal(destroyCount, 2, 'both list items were correctly destroyed');
assert.equal(destroyCount, 2, 'remaining list item was correctly destroyed');
}

@test
Expand Down

0 comments on commit 19f1962

Please sign in to comment.