Skip to content
This repository was archived by the owner on Feb 22, 2018. It is now read-only.

Commit 26387cb

Browse files
committed
test(dccd): adding a failing test case for observable list.
1 parent 1b6ffd0 commit 26387cb

File tree

1 file changed

+17
-0
lines changed

1 file changed

+17
-0
lines changed

test/change_detection/dirty_checking_change_detector_spec.dart

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -976,6 +976,23 @@ void addListSpec({bool useObservable}) {
976976
moves: ['b[1 -> 0]', 'a[0 -> 1]'],
977977
removals: []));
978978
}));
979+
980+
iit('should list reference changes', () {
981+
var list = listFactory(['a']);
982+
var record = detector.watch(list, null, null);
983+
if (detector.collectChanges().moveNext()) {
984+
detector.collectChanges();
985+
}
986+
987+
record.object = listFactory(['b']);
988+
var iterator = detector.collectChanges()..moveNext();
989+
expect(iterator.current.currentValue, toEqualCollectionRecord(
990+
collection: ['b[null -> 0]'],
991+
previous: ['a[0 -> null]'],
992+
additions: ['b[null -> 0]'],
993+
moves: [],
994+
removals: ['a[0 -> null]']));
995+
});
979996
});
980997
}
981998

0 commit comments

Comments
 (0)