Explorar o código

EAGLESIX-2696 formatting changes and merge goodness

Tony Ennis %!s(int64=11) %!d(string=hai) anos
pai
achega
800e5318da
Modificáronse 1 ficheiros con 18 adicións e 26 borrados
  1. 18 26
      test/lib/pipeline/expressions/ConstantExpression_test.js

+ 18 - 26
test/lib/pipeline/expressions/ConstantExpression_test.js

@@ -5,28 +5,27 @@ var assert = require("assert"),
 	VariablesParseState = require("../../../../lib/pipeline/expressions/VariablesParseState");
 
 // Mocha one-liner to make these tests self-hosted
-if(!module.parent)return(require.cache[__filename]=null,(new(require("mocha"))({ui:"exports",reporter:"spec",grep:process.env.TEST_GREP})).addFile(__filename).run(process.exit));
+if (!module.parent)return(require.cache[__filename] = null, (new (require("mocha"))({ui: "exports", reporter: "spec", grep: process.env.TEST_GREP})).addFile(__filename).run(process.exit));
 
 exports.ConstantExpression = {
 
 	".constructor()": {
 
-		"should accept one argument": function() {
+		"should accept one argument": function () {
 			new ConstantExpression(5);
 		},
 
-		"should not accept 0 arguments": function() {
-			assert.throws(function() {
-				 new ConstantExpression();
+		"should not accept 0 arguments": function () {
+			assert.throws(function () {
+				new ConstantExpression();
 			});
 		},
 
-		"should not accept 2 arguments": function() {
-			assert.throws(function() {
+		"should not accept 2 arguments": function () {
+			assert.throws(function () {
 				new ConstantExpression(1, 2);
 			});
-		},
-
+		}
 	},
 
 	".parse()": {
@@ -36,18 +35,15 @@ exports.ConstantExpression = {
 				vps = new VariablesParseState(idGenerator),
 				expression = ConstantExpression.parse("foo", vps);
 			assert.deepEqual("foo", expression.evaluate({}));
-		},
-
+		}
 	},
 
 	".create()": {
 
 		"should create an expression": function testCreate() {
 			assert(ConstantExpression.create() instanceof ConstantExpression);
-		},
-
+		}
 		//SKIPPED: testCreateFronBsonElement
-
 	},
 
 	"#optimize()": {
@@ -55,8 +51,7 @@ exports.ConstantExpression = {
 		"should not optimize anything": function testOptimize() {
 			var expr = new ConstantExpression(5);
 			assert.strictEqual(expr, expr.optimize());
-		},
-
+		}
 	},
 
 	"#addDependencies()": {
@@ -68,8 +63,7 @@ exports.ConstantExpression = {
 			assert.strictEqual(deps.fields.length, 0);
 			assert.strictEqual(deps.needWholeDocument, false);
 			assert.strictEqual(deps.needTextScore, false);
-		},
-
+		}
 	},
 
 	//TODO: AddToBsonObj
@@ -78,30 +72,28 @@ exports.ConstantExpression = {
 
 	"#evaluate()": {
 
-		"should do what comes natural with an int": function() {
+		"should do what comes natural with an int": function () {
 			var c = 567;
 			var expr = new ConstantExpression(c);
 			assert.deepEqual(expr.evaluate(), c);
 		},
 
-		"should do what comes natural with a float": function() {
+		"should do what comes natural with a float": function () {
 			var c = 567.123;
 			var expr = new ConstantExpression(c);
 			assert.deepEqual(expr.evaluate(), c);
 		},
 
-		"should do what comes natural with a String": function() {
+		"should do what comes natural with a String": function () {
 			var c = "Quoth the raven";
 			var expr = new ConstantExpression(c);
 			assert.deepEqual(expr.evaluate(), c);
 		},
 
-		"should do what comes natural with a date": function() {
+		"should do what comes natural with a date": function () {
 			var c = new Date();
 			var expr = new ConstantExpression(c);
 			assert.deepEqual(expr.evaluate(), c);
-		},
-
-	},
-
+		}
+	}
 };