<commit_before>/**
 * Copyright © 2009-2012 <NAME>
 */
/**
 * A re-implementation of Jasmine (http://pivotal.github.com/jasmine/) just for fun
 *
 * Author:
 *	Seldaiendil <<EMAIL>>
 *	<NAME>. <<EMAIL>>
 */

use('sassmine').on(function(sas) {

 	sas.BlockType = {
		SUITE: 1,
		SPEC: 2,
	};

 	sas.MessageType = {
		SUITE: 1,
		SPEC: 2,
		ERROR: 3
	};

	sas.Sassmine = Class.extend({

		printer: new (use.isNode ? sas.ConsolePrinter : sas.DomPrinter),

		constructor: function() {
			this.base();

			this.levels = [ new sas.Suite('root suite') ];
			this.current = 0;
		},

		addBlock: function(type, node) {
			this.printer.addLevel(type);
			this.printer.print(type, node.message);

			var parent = this.levels[this.current];
			this.current = this.levels.length;
			this.levels[this.current] = node;

 			try {
 				parent.beforeEach();
 				node.execute();
 				parent.afterEach();
			} catch(err) {
				this.fail(err);
			} finally {
				this.levels.length--;
				this.current--;
			}

 			this.printer.removeLevel();
		},

 		fail: function(error) {<commit_msg>Added debug mode<commit_after>/**
 * Copyright © 2009-2012 <NAME>
 */
/**
 * A re-implementation of Jasmine (http://pivotal.github.com/jasmine/) just for fun
 *
 * Author:
 *	Seldaiendil <<EMAIL>>
 *	<NAME>. <<EMAIL>>
 */

use('sassmine').on(function(sas) {

 	sas.BlockType = {
		SUITE: 1,
		SPEC: 2,
	};

 	sas.MessageType = {
		SUITE: 1,
		SPEC: 2,
		ERROR: 3
	};

	sas.Sassmine = Class.extend({

		printer: new (use.isNode ? sas.ConsolePrinter : sas.DomPrinter),

		constructor: function() {
			this.base();

			this.levels = [ new sas.Suite('root suite') ];
			this.current = 0;
		},

		addBlock: function(type, node) {
			this.printer.addLevel(type);
			this.printer.print(type, node.message);

			var parent = this.levels[this.current];
			this.current = this.levels.length;
			this.levels[this.current] = node;

			if (sas.DEBUG) {
 				parent.beforeEach();
 				node.execute();
 				parent.afterEach();
				this.levels.length--;
				this.current--;
			} else {
	 			try {
	 				parent.beforeEach();
	 				node.execute();
	 				parent.afterEach();
				} catch(err) {
					this.fail(err);
				} finally {
					this.levels.length--;
					this.current--;
				}
			}

 			this.printer.removeLevel();
		},

 		fail: function(error) {
{'fraction_non_alphanumeric': 0.1753472222222222, 'fraction_numerical': 0.012152777777777778, 'mean_word_length': 2.717741935483871, 'pattern_counts': {'":': 0, '<': 15, '<?xml version=': 0, '>': 15, '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': '1404951', 'n_tokens_mistral': 1066, 'n_tokens_neox': 851, 'n_words': 154}