hughfdjackson/immutable

2014-01-08 09:39:07
6.0
7.0
8.0
✓9.0
10.0
4.0
23.0
✓3.0
✓17.0
✓5.1
✓5.0.5
✓10.0
✓12.0
1..76 ok 1 isImmutable should return true on immutable objects ok 2 isImmutable should return false on data that has an immutable flag ok 3 isImmutable should require get, set, has, assoc and dissoc to be functions, along with an immutable flag ok 4 isImmutable should return false on all js primitives ok 5 im.array freezes arrays on creation if available ok 6 im.array .immutable should be set to true ok 7 im.array .assoc should allow a new version to be made with added properties ok 8 im.array .assoc should return an im.array ok 9 im.array .assoc shouldn't copy over properties on the prototype ok 10 im.array .length should get updated to be the largest int + 1 ok 11 im.array .mutable should return an array with all properties copied ok 12 im.array .mutable should represent gaps with missing data ok 13 im.array .toJSON should be an alias for .mutable ok 14 im.array .map should create an immutable object with updated values ok 15 im.array .map should pass val, key, array ok 16 im.array .forEach should pass val, key, array, but return nothing ok 17 im.array .every should return false if the predicate does once ok 18 im.array .every should return true if predicate always is satisfied ok 19 im.array .every should pass val, key, array ok 20 im.array .some should return true if the predicate does once ok 21 im.array .some should return false if predicate never is satisfied ok 22 im.array .some should pass val, key, array ok 23 im.array .filter should filter a collection ok 24 im.array .filter should pass val, key, array ok 25 im.array .reduce should reduce over collection in left to right order ok 26 im.array .reduce should use first item as seed if none passed ok 27 im.array .reduceRight should reduce over collection in right to left order ok 28 im.array .reduceRight should use first item as seed if none passed ok 29 im.array .equal should return false if the value is not an immutable object ok 30 im.array .equal should equal itself ok 31 im.array .equal should make two empty objects equal ok 32 im.array .equal should return false for two structurally different objects ok 33 im.array .equal should return true for two structurally equal objects ok 34 im.array .equal should return false for two different mutable objects as properties ok 35 im.array .equal should recurse with equal ok 36 im.array .push should add on a new array member at the end ok 37 im.array .indexOf should return the indexOf an element found with .equal ok 38 im.array .indexOf should return the indexOf an element with === ok 39 im.array .indexOf should return -1 for not found (ugh - it is standard though) ok 40 im.array .indexOf should return the first index ok 41 immutable should export API ok 42 im.object has the right constructor ok 43 im.object freezes object on creation if Object.freeze is available ok 44 im.object creation should be a newless constructor ok 45 im.object creation creates an empty object if no props are passed ok 46 im.object creation creates an object with props passed in ok 47 im.object creation shouldn't copy over properties on the prototype ok 48 im.object .immutable should be set to true ok 49 im.object .assoc returns a new immutable object with props updated ok 50 im.object .dissoc returns a new immutable object with props removed ok 51 im.object .get should return a value of a stored property, or else undefined ok 52 im.object .has should return true or false, indicating whether a property exists on the prop ok 53 im.object .mutable should return a mutable version of the immutable object ok 54 im.object .toJSON should be an alias for mutable ok 55 im.object .map should create an immutable object with updated values ok 56 im.object .map should pass val, key, object ok 57 im.object .forEach should pass val, key, object, but return nothing ok 58 im.object .every should return false if the predicate does once ok 59 im.object .every should return true if predicate always is satisfied ok 60 im.object .every should pass val, key, object ok 61 im.object .some should return true if the predicate does once ok 62 im.object .some should return false if predicate never is satisfied ok 63 im.object .some should pass val, key, object ok 64 im.object .filter should filter a collection ok 65 im.object .filter should pass val, key, object ok 66 im.object .reduce should reduce over collection in any order ok 67 im.object .reduce should use "first" item as seed if none passed ok 68 im.object .equal should return false if the value is not an immutable object ok 69 im.object .equal should equal itself ok 70 im.object .equal should make two empty objects equal ok 71 im.object .equal should return false for two structurally different objects ok 72 im.object .equal should return true for two structurally equal objects ok 73 im.object .equal should return false for two different mutable objects as properties ok 74 im.object .equal should recurse with equal ok 75 im.object .equal shouldn't call equal on a non-immutable object ok 76 im.object .equal should return false if there are an unequal number of properties # tests 76 # pass 76 # fail 0
1..76 ok 1 isImmutable should return true on immutable objects ok 2 isImmutable should return false on data that has an immutable flag ok 3 isImmutable should require get, set, has, assoc and dissoc to be functions, along with an immutable flag ok 4 isImmutable should return false on all js primitives ok 5 im.array freezes arrays on creation if available ok 6 im.array .immutable should be set to true ok 7 im.array .assoc should allow a new version to be made with added properties ok 8 im.array .assoc should return an im.array ok 9 im.array .assoc shouldn't copy over properties on the prototype ok 10 im.array .length should get updated to be the largest int + 1 ok 11 im.array .mutable should return an array with all properties copied ok 12 im.array .mutable should represent gaps with missing data ok 13 im.array .toJSON should be an alias for .mutable ok 14 im.array .map should create an immutable object with updated values ok 15 im.array .map should pass val, key, array ok 16 im.array .forEach should pass val, key, array, but return nothing ok 17 im.array .every should return false if the predicate does once ok 18 im.array .every should return true if predicate always is satisfied ok 19 im.array .every should pass val, key, array ok 20 im.array .some should return true if the predicate does once ok 21 im.array .some should return false if predicate never is satisfied ok 22 im.array .some should pass val, key, array ok 23 im.array .filter should filter a collection ok 24 im.array .filter should pass val, key, array ok 25 im.array .reduce should reduce over collection in left to right order ok 26 im.array .reduce should use first item as seed if none passed ok 27 im.array .reduceRight should reduce over collection in right to left order ok 28 im.array .reduceRight should use first item as seed if none passed ok 29 im.array .equal should return false if the value is not an immutable object ok 30 im.ar