Skip to content

Commit

Permalink
Minor improvements
Browse files Browse the repository at this point in the history
  • Loading branch information
koresar committed Sep 20, 2016
1 parent 2e2268b commit 8cb6a92
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/stampit.js
Expand Up @@ -16,7 +16,7 @@ const assign = Object.assign;
function composeArgsCall(self, propName, action, args) {
const descriptor = {};
descriptor[propName] = action(...[{}].concat(args));
return ((self && self.compose) || baseStampit.compose).call(self, descriptor);
return ((self && self.compose) || stampit).call(self, descriptor);
}

export function methods(...args) {
Expand All @@ -30,7 +30,7 @@ export {properties as refs};
export {properties as props};

export function initializers(...args) {
return ((this && this.compose) || baseStampit.compose).call(this, {
return ((this && this.compose) || stampit).call(this, {
initializers: extractFunctions(...args)
});
}
Expand Down
2 changes: 2 additions & 0 deletions test/basics.js
Expand Up @@ -10,6 +10,7 @@ test('.create()', (t) => {
}
});

t.ok(stamp.create);
t.equal(stamp.create().foo(), 'foo',
'Should produce an object from specified prototypes.');

Expand All @@ -22,5 +23,6 @@ test('.create(options)', (t) => {
'Should pass options object to initializer.');
t.end();
});
t.ok(stamp.create);
stamp.create({foo: 'bar'});
});

0 comments on commit 8cb6a92

Please sign in to comment.