Skip to content

Commit

Permalink
Add unit test for objectAt
Browse files Browse the repository at this point in the history
(cherry picked from commit f537773)
  • Loading branch information
btecu authored and rwjblue committed Feb 21, 2016
1 parent accae3b commit 67d6b2f
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions packages/ember-runtime/tests/mixins/array_test.js
Original file line number Diff line number Diff line change
Expand Up @@ -390,6 +390,11 @@ QUnit.test('modifying the array should also indicate the isDone prop itself has
equal(count, 1, '@each.isDone should have notified');
});

QUnit.test('`objectAt` returns correct object', function() {
let arr = ['first', 'second', 'third', 'fourth'];
equal(objectAt(arr, 2), 'third');
equal(objectAt(arr, 4), undefined);
});

testBoth('should be clear caches for computed properties that have dependent keys on arrays that are changed after object initialization', function(get, set) {
var obj = EmberObject.extend({
Expand Down

0 comments on commit 67d6b2f

Please sign in to comment.