diff --git a/packages/core/test/injector/instance-wrapper.spec.ts b/packages/core/test/injector/instance-wrapper.spec.ts index 88bcb489735..512900460e6 100644 --- a/packages/core/test/injector/instance-wrapper.spec.ts +++ b/packages/core/test/injector/instance-wrapper.spec.ts @@ -449,5 +449,18 @@ describe('InstanceWrapper', () => { ).to.be.equal('value'); }); }); + + describe('when provider is a ClassProvider', () => { + it('should alter the instance wrapper metatype with the given class', () => { + const wrapper = new InstanceWrapper(); + + wrapper.mergeWith({ + useClass: TestClass, + provide: 'token', + }); + + expect(wrapper.metatype).to.be.eql(TestClass); + }); + }); }); });