import { createMock } from 'ts-auto-mock' ; import { NameSpaceInterfaceImport } from '../utils/namespace/namespace' ; import IAmAnotherExportedWithEqual from '../utils/interfaces/anotherExportEqual' ; import IAmExportedWithEqual = require ( '../utils/interfaces/exportEqual' ) ; import Interface = NameSpaceInterfaceImport . Interface ; import SubInterface = NameSpaceInterfaceImport . SubNamespace . SubInterface ; import Enum = NameSpaceInterfaceImport . Enum ; describe ( 'import equal' , ( ) => { it ( 'should use the correct import for an interface' , ( ) => { const mock = createMock < Interface > ( ) ; expect ( mock . a ) . toBe ( '' ) ; } ) ; it ( 'should use the correct import for a literal' , ( ) => { interface InterfaceWithEnumFromModule { enum : Enum ; } const mock = createMock < InterfaceWithEnumFromModule > ( ) ; expect ( mock . enum ) . toBe ( Enum . A ) ; } ) ; it ( 'should use the correct import for a sub module interface' , ( ) => { const mock = createMock < SubInterface > ( ) ; expect ( mock . a ) . toBe ( '' ) ; } ) ; it ( 'should use the correct import for an equal exported interface used with require' , ( ) => { const mock = createMock < IAmExportedWithEqual > ( ) ; expect ( mock . a ) . toBe ( '' ) ; expect ( mock . b ) . toBe ( 0 ) ; } ) ; it ( 'should use the correct import for an equal exported interface used with import' , ( ) => { const mock = createMock < IAmAnotherExportedWithEqual > ( ) ; expect ( mock . a ) . toBe ( '' ) ; expect ( mock . b ) . toBe ( 0 ) ; } ) ; } ) ;