Comparing version 0.0.3 to 1.0.0
{ | ||
"name": "saywhen", | ||
"version": "0.0.3", | ||
"version": "1.0.0", | ||
"description": "Better spy fake calls for Jasmine", | ||
@@ -5,0 +5,0 @@ "keywords": [ |
@@ -120,3 +120,3 @@ saywhen | ||
captor.values(); // => [123, 456] | ||
captor.value(); // => 456 (last value) | ||
captor.latest; // => 456 (last value) | ||
``` | ||
@@ -138,3 +138,3 @@ | ||
captor.values(); // => [2, 3] | ||
captor.value(); // => 3 | ||
captor.latest; // => 3 | ||
``` | ||
@@ -141,0 +141,0 @@ --- |
@@ -55,3 +55,3 @@ var handlers = []; | ||
if (matcher(arg)) { | ||
values.push(arg); | ||
append(arg); | ||
return true; | ||
@@ -63,4 +63,5 @@ } | ||
matcherProxy.value = function() { | ||
return values[values.length - 1]; | ||
var append = function(val) { | ||
matcherProxy.latest = val; | ||
values.push(val); | ||
}; | ||
@@ -67,0 +68,0 @@ |
@@ -216,3 +216,3 @@ var when = require('../saywhen'); | ||
expect(captor.value()).toBe("foo"); | ||
expect(captor.latest).toBe("foo"); | ||
expect(captor.values()).toEqual(["foo"]); | ||
@@ -229,3 +229,3 @@ }); | ||
expect(captor.value()).toBe("bar"); | ||
expect(captor.latest).toBe("bar"); | ||
expect(captor.values()).toEqual(["foo", "bar"]); | ||
@@ -243,3 +243,3 @@ }); | ||
expect(captor.value()).toBe(789); | ||
expect(captor.latest).toBe(789); | ||
expect(captor.values()).toEqual([123, 789]); | ||
@@ -270,3 +270,3 @@ }); | ||
expect(captor.value()).toBe('bar'); | ||
expect(captor.latest).toBe('bar'); | ||
expect(captor.values()).toEqual(['foo', 'bar']); | ||
@@ -286,5 +286,5 @@ }); | ||
expect(captor.value()).toBe(3); | ||
expect(captor.latest).toBe(3); | ||
expect(captor.values()).toEqual([1, 3]); | ||
}); | ||
}); |
No v1
QualityPackage is not semver >=1. This means it is not stable and does not support ^ ranges.
Found 1 instance in 1 package
343
0