Comparing version 0.3.1 to 0.3.2
"use strict"; | ||
var util = require("util"), | ||
@@ -244,3 +243,3 @@ path = require("path"), | ||
initInstanceVars(this); | ||
if (!propertyName) error(this, new Error("please supply an propertyName")); | ||
if (!propertyName) error(this, new Error("please supply a propertyName")); | ||
@@ -421,3 +420,3 @@ var item = this._definitions[propertyName]; | ||
/** | ||
A annoy of defined properties | ||
An array of defined properties | ||
@property properties | ||
@@ -424,0 +423,0 @@ @type Array |
{ | ||
"name": "nature", | ||
"version": "0.3.1", | ||
"version": "0.3.2", | ||
"description": "Classify the things in your world and how they interact.", | ||
@@ -14,7 +14,7 @@ "main": "lib/nature.js", | ||
"dependencies": { | ||
"underscore": "~1.5.2", | ||
"wodge": "~0.1.0" | ||
"underscore": "~1.6", | ||
"wodge": "~0.3.0" | ||
}, | ||
"devDependencies": { | ||
"mocha": "~1.17", | ||
"mocha": "~1.18", | ||
"grunt": "~0.4.1", | ||
@@ -21,0 +21,0 @@ "yuidoc2md": "~0.2.2", |
@@ -8,6 +8,3 @@ var assert = require("assert"), | ||
describe("Thing", function(){ | ||
it("should toArray()"); | ||
it("should list defined properties"); | ||
it("should be compatible with --property=value style"); | ||
it("passing required:true should test for defaultOption.length > 0"); | ||
it("should remove() an property and its alias"); | ||
it("this case should be invalid straight after definition: { type: Array, valueTest: function(a){ return a.length > 0; }}"); | ||
@@ -26,2 +23,3 @@ it("should throw when a none-existent property is accessed, e.g. console.log(properties.dfkdshl)"); | ||
it("should emit 'invalid' when thing changes from valid to invalid"); | ||
it("nature should set valid=false on error, instead of throwing an error requiring a handler") | ||
@@ -188,4 +186,2 @@ var _thing; | ||
it("should remove() an property and its alias"); | ||
describe(".get", function(){ | ||
@@ -404,13 +400,14 @@ it("get(property) with no value set", function(){ | ||
it(".clone()", function(){ | ||
_thing.define({ name: "one", type: "number", value: 1 }) | ||
.define({ name: "two", type: "number", value: 2 }); | ||
describe(".clone", function(){ | ||
it("clones correctly", function(){ | ||
_thing.define({ name: "one", type: "number", value: 1 }) | ||
.define({ name: "two", type: "number", value: 2 }); | ||
var config2 = _thing.clone(); | ||
assert.notStrictEqual(_thing, config2); | ||
assert.deepEqual(_.omit(_thing.definition("one"), "config"), _.omit(config2.definition("one"), "config")); | ||
assert.deepEqual(_.omit(_thing.definition("two"), "config"), _.omit(config2.definition("two"), "config")); | ||
var config2 = _thing.clone(); | ||
assert.notStrictEqual(_thing, config2); | ||
assert.deepEqual(_.omit(_thing.definition("one"), "config"), _.omit(config2.definition("one"), "config")); | ||
assert.deepEqual(_.omit(_thing.definition("two"), "config"), _.omit(config2.definition("two"), "config")); | ||
}); | ||
}); | ||
it(".properties() should return Array of property names"); | ||
describe(".mixin", function(){ | ||
@@ -417,0 +414,0 @@ it("mixin(thing)", function(){ |
Sorry, the diff of this file is not supported yet
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
91093
1747
+ Addedunderscore@1.6.0(transitive)
+ Addedwodge@0.3.2(transitive)
- Removedunderscore@1.5.2(transitive)
- Removedwodge@0.1.5(transitive)
Updatedunderscore@~1.6
Updatedwodge@~0.3.0