Skip to content

Commit 2069aae

Browse files
committed
test(common): correct expectation in catch
1 parent 36d5a81 commit 2069aae

1 file changed

Lines changed: 4 additions & 2 deletions

File tree

packages/common/test/decorators/use-interceptors.decorator.spec.ts

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,10 +30,12 @@ describe('@UseInterceptors', () => {
3030
});
3131

3232
it('when object is invalid should throw exception', () => {
33+
let error = undefined;
3334
try {
34-
UseInterceptors('test' as any)({});
35+
UseInterceptors('test' as any)({ name: 'target' });
3536
} catch (e) {
36-
expect(e).to.be.instanceof(InvalidDecoratorItemException);
37+
error = e;
3738
}
39+
expect(error).to.be.instanceof(InvalidDecoratorItemException);
3840
});
3941
});

0 commit comments

Comments
 (0)