Sha256: 7b9be0d6aee83ed6167776c2e289ac2d35d0afd260b075edadab3521be5658bd

Contents?: true

Size: 592 Bytes

Versions: 37

Compression:

Stored size: 592 Bytes

Contents

module("SC.Array mixin - Array observers");

(function(root) {
  test("notifies entire array has changed when arrayContentDidChange() is called with no arguments", function() {
    var content = [1, 2, 3, 4, 5];
    var start, added, removed;

    content.addArrayObservers({
      didChange: function(s, r, a) {
        start = s;
        added = a;
        removed = r;
      }
    });

    content.arrayContentDidChange();

    equals(start, 0, "change starts at index 0");
    equals(removed, 5, "five items were removed");
    equals(added, 0, "zero items were added");
  });

})(this);

Version data entries

37 entries across 37 versions & 1 rubygems

Version Path
sproutcore-1.11.0 lib/frameworks/sproutcore/frameworks/runtime/tests/mixins/array_observers.js
sproutcore-1.11.0.rc3 lib/frameworks/sproutcore/frameworks/runtime/tests/mixins/array_observers.js
sproutcore-1.11.0.rc2 lib/frameworks/sproutcore/frameworks/runtime/tests/mixins/array_observers.js
sproutcore-1.11.0.rc1 lib/frameworks/sproutcore/frameworks/runtime/tests/mixins/array_observers.js
sproutcore-1.10.3.1 lib/frameworks/sproutcore/frameworks/runtime/tests/mixins/array_observers.js
sproutcore-1.10.2 lib/frameworks/sproutcore/frameworks/runtime/tests/mixins/array_observers.js
sproutcore-1.10.1 lib/frameworks/sproutcore/frameworks/runtime/tests/mixins/array_observers.js
sproutcore-1.10.0 lib/frameworks/sproutcore/frameworks/runtime/tests/mixins/array_observers.js
sproutcore-1.10.0.rc.3 lib/frameworks/sproutcore/frameworks/runtime/tests/mixins/array_observers.js
sproutcore-1.10.0.rc.2 lib/frameworks/sproutcore/frameworks/runtime/tests/mixins/array_observers.js
sproutcore-1.10.0.rc.1 lib/frameworks/sproutcore/frameworks/runtime/tests/mixins/array_observers.js
sproutcore-1.9.2 lib/frameworks/sproutcore/frameworks/runtime/tests/mixins/array_observers.js
sproutcore-1.9.1 lib/frameworks/sproutcore/frameworks/runtime/tests/mixins/array_observers.js
sproutcore-1.9.0 lib/frameworks/sproutcore/frameworks/runtime/tests/mixins/array_observers.js
sproutcore-1.8.2.1 lib/frameworks/sproutcore/frameworks/runtime/tests/mixins/array_observers.js
sproutcore-1.8.1 lib/frameworks/sproutcore/frameworks/runtime/tests/mixins/array_observers.js
sproutcore-1.8.0 lib/frameworks/sproutcore/frameworks/runtime/tests/mixins/array_observers.js
sproutcore-1.7.1.beta-java lib/frameworks/sproutcore/frameworks/runtime/tests/mixins/array_observers.js
sproutcore-1.7.1.beta lib/frameworks/sproutcore/frameworks/runtime/tests/mixins/array_observers.js
sproutcore-1.6.0.1-java lib/frameworks/sproutcore/frameworks/runtime/tests/mixins/array_observers.js