Skip to content

Commit

Permalink
test(repeat-integration-spec): add failing test for push sort bug
Browse files Browse the repository at this point in the history
Failing test for bug aurelia/binding#233
  • Loading branch information
martingust committed Dec 2, 2015
1 parent b2741c9 commit 8769ce3
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions test/repeat-integration.spec.js
Expand Up @@ -247,6 +247,20 @@ function describeArrayTests(viewsRequireLifecycle) {
nq(() => done());
});

it('handles push and sort', done => {
let template = `<template><div repeat.for="item of items">\${item}</div></template>`;
viewModel = { items: ['a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j'] };
controller = createController(template, viewModel, true);
validateState();
nq(() => {
// Failing test for bug https://github.com/aurelia/binding/issues/233
// viewModel.items.push('x');
// viewModel.items.sort((a, b) => {});
});
nq(() => validateState());
nq(() => done());
});

it('handles splice', done => {
viewModel.items.splice(2, 1, 'x', 'y');
nq(() => validateState());
Expand Down

0 comments on commit 8769ce3

Please sign in to comment.