<commit_before>describe('Scope', function() {
	var scope;

	beforeEach(function() {
		scope = new Scope();
	});

	describe('watchCollection()', function() {
		it('should watch a collection', function() {
			var collectionWatcherSpy = jasmine.createSpy();

			scope.$watchCollection('some.deep.object.you.should.watch', collectionWatcherSpy);

			var array = [];
			scope.some.deep.object.you.should.watch = array;
			array.push(1,2,3,4,5,6);

			scope.deliverChangeRecords();

			expect(collectionWatcherSpy).toHaveBeenCalledWith([1,2,3,4,5,6]);
		});

		it('should keep watching an object, even if the path get redefined', function() {
			var collectionWatcherSpy = jasmine.createSpy();
			var objectList = [];

			scope.hereIs = {
				someDeep: {
					objectList: objectList
				}
			};

			scope.$watchCollection('hereIs.someDeep.objectList', collectionWatcherSpy);
			objectList.push(1, 2, 3, 4);

			scope.deliverChangeRecords();

			expect(collectionWatcherSpy).toHaveBeenCalledWith([1,2,3,4]);

			scope.hereIs.someDeep.objectList = objectList = {};
			scope.deliverChangeRecords();

			expect(collectionWatcherSpy).toHaveBeenCalledWith({});

			objectList.somePropertyHere = 0;
			scope.deliverChangeRecords();

			expect(collectionWatcherSpy).toHaveBeenCalledWith({somePropertyHere: 0});

			objectList = objectList.someObjectHere = {};
			scope.deliverChangeRecords();

			expect(collectionWatcherSpy).toHaveBeenCalledWith({
				somePropertyHere: 0,
				someObjectHere: {}
			});

			objectList.hereIsMoreOneProperty = 1;
			scope.deliverChangeRecords();

			expect(collectionWatcherSpy).toHaveBeenCalledWith({
				somePropertyHere: 0,
				someObjectHere: {
					hereIsMoreOneProperty: 1
				}
			});
		});
	});

	describe('watchObject()', function() {
		it('should detect deep changes of properties', function() {
			var objectWatcherSpy = jasmine.createSpy();
			var array = [1,2,3,4,5];

			scope.here = {
				is: {
					some: {
						object: array
					}
				}
			};

			scope.watchObject('here.is.some.object', objectWatcherSpy);

			var n;

			for(var i = 0; i < 60; i++) {
				n = array.length + 1;

				array.push(n);
				scope.deliverChangeRecords();

				expect(objectWatcherSpy).toHaveBeenCalledWith('is.some.object.' + (array.length - 1));
				expect(objectWatcherSpy).toHaveBeenCalledWith('is.some.object.length');
			}
		});
	});

  describe('watch()', function() {
    it('should watch a property', function() {
      var listenerSpy = jasmine.createSpy();
      scope.$watch('someProperty', listenerSpy);

      scope.someProperty = 'someValueHere';
      scope.deliverChangeRecords();

      expect(listenerSpy).toHaveBeenCalledWith('someValueHere');
    });

    it('should deep properties', function() {
      var watcherSpy = jasmine.createSpy();
<commit_msg>chore(test/Scope.js): Removed useless and huge test suite for the methods `watchObject()` and `watchCollection()` which no longer exists on the Watcher prototype<commit_after>describe('Scope', function() {
	var scope;

	beforeEach(function() {
		scope = new Scope();
	});
  describe('watch()', function() {
    it('should watch a property', function() {
      var listenerSpy = jasmine.createSpy();
      scope.$watch('someProperty', listenerSpy);

      scope.someProperty = 'someValueHere';
      scope.deliverChangeRecords();

      expect(listenerSpy).toHaveBeenCalledWith('someValueHere');
    });

    it('should deep properties', function() {
      var watcherSpy = jasmine.createSpy();

{'fraction_non_alphanumeric': 0.14498995119150157, 'fraction_numerical': 0.0103359173126615, 'mean_word_length': 4.027417027417028, 'pattern_counts': {'":': 0, '<': 4, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '710254', 'n_tokens_mistral': 1279, 'n_tokens_neox': 1082, 'n_words': 194}