import { Test , TestingModule } from '@nestjs/testing' ; import { FeatureHandlerNoHandler } from './feature-handler-no-handler.handler' ; describe ( 'FeatureHandlerNoHandler' , ( ) => { let service ; beforeEach ( async ( ) => { const module = await Test . createTestingModule ( { providers : [ FeatureHandlerNoHandler ] , } ) . compile ( ) ; service = module . get < FeatureHandlerNoHandler > ( FeatureHandlerNoHandler ) ; jest . resetAllMocks ( ) ; } ) ; it ( 'should be defined' , ( ) => { expect ( service ) . toBeDefined ( ) ; } ) ; describe ( 'handle' , ( ) => { it ( 'should return a `Promise`' , async ( ) => { const result = service . handle ( ) ; await result ; expect ( result ) . toBeInstanceOf ( Promise ) ; } ) ; it ( 'should return a null value' , async ( ) => { const result = service . handle ( ) ; await result ; expect ( result ) . resolves . toEqual ( null ) ; } ) ; } ) ; } ) ;