mirror of
https://github.com/kemko/nomad.git
synced 2026-01-03 08:55:43 +03:00
17 lines
356 B
JavaScript
17 lines
356 B
JavaScript
/**
|
|
* Copyright (c) HashiCorp, Inc.
|
|
* SPDX-License-Identifier: BUSL-1.1
|
|
*/
|
|
|
|
export default (ability) => (hooks) => {
|
|
hooks.beforeEach(function () {
|
|
this.ability = this.owner.lookup(`ability:${ability}`);
|
|
this.can = this.owner.lookup('service:can');
|
|
});
|
|
|
|
hooks.afterEach(function () {
|
|
delete this.ability;
|
|
delete this.can;
|
|
});
|
|
};
|