10 lines
201 B
JavaScript
10 lines
201 B
JavaScript
export default ability => hooks => {
|
|
hooks.beforeEach(function() {
|
|
this.ability = this.owner.lookup(`ability:${ability}`);
|
|
});
|
|
|
|
hooks.afterEach(function() {
|
|
delete this.ability;
|
|
});
|
|
};
|