<commit_before>'use strict';

describe('Controller: SignUpCtrl', function () {

  // load the controller's module
  beforeEach(module('npmalerts'));

	// Initialize the controller and a mock scope
	beforeEach(inject(function ($controller, $rootScope) {
		scope = $rootScope.$new();
		MainCtrl = $controller('SignUpCtrl', {
			$scope: scope
		});
	}));

	beforeEach(function() {
		this.addMatchers({

			toBeEmptyArray: function() {
				var actual = this.actual;
				var actualText = 
					Array.isArray(actual) ? 
						(actual.length === 0 ?
							"array" : "[" + actual + "]")
						: (typeof actual); // This might look weird, but detecting empty arrays is weird.

				var notText = this.isNot ? " not" : "";

				this.message = function () {
					return "Expected " + actualText + notText + " to be an empty array.";
				};

				return Array.isArray(actual) && actual.length === 0;
			}

		});
	});

  var MainCtrl,
    scope;


	it('fake test', function() {
// expect(scope.awesomeThings.length).toBe(3);
		expect(true).toBeTruthy();
	});
	
	it('should default to empty email', function() {
		expect(scope.email).toBeNull();
	});
	
	it('should default to empty repo url', function() {
		expect(scope.url).toBeNull();
	});

	it('should default to no alert boxes', function() {
		expect(scope.alerts).toBeEmptyArray();
	});

	it('should default to adding-state', function() {
		expect(scope.isAdding).toBeTruthy();
	});

	it('should add something to alerts when calling displayAlert', function() {
		scope.displayAlert('hej hopp');
		expect(scope.alerts).not.toBeEmptyArray();
	});
<commit_msg>Move declarations of vars in signup test<commit_after>'use strict';

describe('Controller: SignUpCtrl', function () {
	var MainCtrl,
		scope;

  // load the controller's module
  beforeEach(module('npmalerts'));

	// Initialize the controller and a mock scope
	beforeEach(inject(function ($controller, $rootScope) {
		scope = $rootScope.$new();
		MainCtrl = $controller('SignUpCtrl', {
			$scope: scope
		});
	}));

	beforeEach(function() {
		this.addMatchers({

			toBeEmptyArray: function() {
				var actual = this.actual;
				var actualText = 
					Array.isArray(actual) ? 
						(actual.length === 0 ?
							"array" : "[" + actual + "]")
						: (typeof actual); // This might look weird, but detecting empty arrays is weird.

				var notText = this.isNot ? " not" : "";

				this.message = function () {
					return "Expected " + actualText + notText + " to be an empty array.";
				};

				return Array.isArray(actual) && actual.length === 0;
			}

		});
	});



	it('fake test', function() {
// expect(scope.awesomeThings.length).toBe(3);
		expect(true).toBeTruthy();
	});
	
	it('should default to empty email', function() {
		expect(scope.email).toBeNull();
	});
	
	it('should default to empty repo url', function() {
		expect(scope.url).toBeNull();
	});

	it('should default to no alert boxes', function() {
		expect(scope.alerts).toBeEmptyArray();
	});

	it('should default to adding-state', function() {
		expect(scope.isAdding).toBeTruthy();
	});

	it('should add something to alerts when calling displayAlert', function() {
		scope.displayAlert('hej hopp');
		expect(scope.alerts).not.toBeEmptyArray();
	});

{'fraction_non_alphanumeric': 0.16459627329192547, 'fraction_numerical': 0.0018633540372670807, 'mean_word_length': 3.6278735632183907, 'pattern_counts': {'":': 0, '<': 3, '<?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': '7297439', 'n_tokens_mistral': 1156, 'n_tokens_neox': 983, 'n_words': 246}