How do I un-register a decorator in AngularJS?
<p>I ran into a test case where I want to register an AngularJS decorator in the context of the unit test. The decorator helps me mock the interaction between a parent component and its child component.</p>

<p>I register the decorator in my <code>beforeEach</code>, and it works OK. The problem is, the test decorator is not cleaned up after the test completes, and it causes other tests to break.</p>

<p>How can I remove this decorator when my test is completed?</p>

<pre><code>describe('Foo', function() {
    beforeEach(function() {
        angular.module('app.foo').decorator('testDecorator', ...);
    });

    it('is a test', function() {
        ...
    });

    afterEach(function() {
        //what can I do here to get rid of the decorator?
    });
});
</code></pre>