Skip to content

Commit f248243

Browse files
Merge pull request nestjs#3586 from tonyhallett/missing-use-interceptors-test
test(common): add missing test
2 parents 0fe2f66 + ddd9f03 commit f248243

1 file changed

Lines changed: 14 additions & 0 deletions

File tree

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

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,4 +36,18 @@ describe('@UseInterceptors', () => {
3636
expect(e).to.be.instanceof(InvalidDecoratorItemException);
3737
}
3838
});
39+
40+
it('when object is valid should not throw exception', () => {
41+
let error = undefined;
42+
try {
43+
UseInterceptors({
44+
intercept() {
45+
return null;
46+
},
47+
})({ name: 'target' });
48+
} catch (e) {
49+
error = e;
50+
}
51+
expect(error).to.be.undefined;
52+
});
3953
});

0 commit comments

Comments
 (0)