Comparing version 0.0.9 to 0.0.10
@@ -20,12 +20,22 @@ // Generated by CoffeeScript 1.9.1 | ||
assert(this.id, 'Result id not given'); | ||
this.value = null; | ||
} | ||
Result.prototype.get = function(context) { | ||
return context[this.id]; | ||
Result.prototype.getFromContext = function(context) { | ||
if (this.overriden) { | ||
return this.value; | ||
} else { | ||
return context[this.id]; | ||
} | ||
}; | ||
Result.prototype.set = function(context, value) { | ||
Result.prototype.setInContext = function(context, value) { | ||
return context[this.id] = value; | ||
}; | ||
Result.prototype.set = function(value1) { | ||
this.value = value1; | ||
return this.overriden = true; | ||
}; | ||
return Result; | ||
@@ -235,3 +245,3 @@ | ||
if (result instanceof Result) { | ||
objectCopy[i] = result.get(context); | ||
objectCopy[i] = result.getFromContext(context); | ||
} | ||
@@ -244,3 +254,3 @@ } | ||
if (result instanceof Result) { | ||
objectCopy[key] = result.get(context); | ||
objectCopy[key] = result.getFromContext(context); | ||
} | ||
@@ -270,4 +280,4 @@ } | ||
newContext.updateContext(); | ||
return Q(fn.apply(newContext, resolveResultArgs((ref = crossCombineResults.get(context)) != null ? ref : {}, args))).then(function(result) { | ||
lastResult.set(newContext, result); | ||
return Q(fn.apply(newContext, resolveResultArgs((ref = crossCombineResults.getFromContext(context)) != null ? ref : {}, args))).then(function(result) { | ||
lastResult.setInContext(newContext, result); | ||
counts[name].called(description); | ||
@@ -336,5 +346,5 @@ return newContext; | ||
var ref, results; | ||
results = (ref = crossCombineResults.get(context)) != null ? ref : {}; | ||
result.set(results, lastResult.get(context)); | ||
crossCombineResults.set(context, results); | ||
results = (ref = crossCombineResults.getFromContext(context)) != null ? ref : {}; | ||
result.setInContext(results, lastResult.getFromContext(context)); | ||
crossCombineResults.setInContext(context, results); | ||
return context; | ||
@@ -388,3 +398,3 @@ })); | ||
}; | ||
crossCombineResults.set(newContext, crossCombineResults.get(context)); | ||
crossCombineResults.setInContext(newContext, crossCombineResults.getFromContext(context)); | ||
return rightBdd.promiseBuilder.resolve(newContext); | ||
@@ -391,0 +401,0 @@ }); |
{ | ||
"name": "gwt", | ||
"version": "0.0.9", | ||
"version": "0.0.10", | ||
"description": "Given, when, then", | ||
@@ -5,0 +5,0 @@ "main": "lib/index.js", |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
14416
397