Stop exposing config as a reference. resolves #35

This commit is contained in:
Keegan
2016-03-11 02:25:59 +11:00
parent 3b7c4cda7c
commit b1a6f184ba
5 changed files with 16 additions and 3 deletions
+9
View File
@@ -135,6 +135,15 @@ describe('Clay', function() {
});
});
describe('.config', function() {
it('is a copy not a reference', function() {
var config = fixture.config(['input', 'text', 'color']);
var clay = fixture.clay(config);
assert.notStrictEqual(clay.config, config);
assert.deepEqual(clay.config, config);
});
});
describe('.registerComponent()', function() {
it('adds the component to the this.components', function() {
var clay = fixture.clay([]);