can-construct
Advanced tools
Comparing version
@@ -301,1 +301,22 @@ QUnit = require('steal-qunit'); | ||
}); | ||
QUnit.test("Extending should not update defaults nested objects", function() { | ||
var Parent = Construct.extend({ | ||
defaults: { | ||
obj: { | ||
foo: "Bar" | ||
} | ||
} | ||
},{}); | ||
var Child = Parent.extend({ | ||
defaults: { | ||
obj: { | ||
foo: "Baz" | ||
} | ||
} | ||
}, {}); | ||
QUnit.equal(Parent.defaults.obj.foo, "Bar", "Base defaults are not changed"); | ||
QUnit.equal(Child.defaults.obj.foo, "Baz", "Child defaults get defaults right"); | ||
}); |
@@ -402,3 +402,3 @@ "use strict"; | ||
setup: function (base) { | ||
var defaults = canReflect.assignDeepMap({},base.defaults); | ||
var defaults = base.defaults ? canReflect.serialize(base.defaults) : {}; | ||
this.defaults = canReflect.assignDeepMap(defaults,this.defaults); | ||
@@ -405,0 +405,0 @@ }, |
{ | ||
"name": "can-construct", | ||
"version": "3.5.4", | ||
"version": "3.5.5", | ||
"description": "easy constructor functions", | ||
@@ -49,3 +49,3 @@ "homepage": "http://canjs.com", | ||
"steal-tools": "^1.1.2", | ||
"testee": "^0.8.0" | ||
"testee": "^0.9.0" | ||
}, | ||
@@ -52,0 +52,0 @@ "repository": { |
# can-construct | ||
[](https://gitter.im/canjs/canjs?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge) | ||
[](https://www.bitovi.com/community/slack?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge) | ||
[](https://forums.bitovi.com/?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge) | ||
[](https://github.com/canjs/can-construct/blob/master/LICENSE.md) | ||
@@ -26,2 +27,1 @@ [](https://www.npmjs.com/package/can-construct) | ||
[MIT](https://github.com/canjs/can-construct/blob/master/LICENSE.md) | ||
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
Found 1 instance in 1 package
48398
1.3%1191
1.53%2
100%