import { expect } from "chai" ; import { PresentationError , PresentationStatus } from "../presentation-common" ; describe ( "PresentationError" , ( ) => { describe ( "[get] name" , ( ) => { it ( "returns name of PresentationStatus when exists" , ( ) => { const error = new PresentationError ( PresentationStatus . InvalidArgument ) ; expect ( error . name ) . to . eq ( "InvalidArgument" ) ; } ) ; it ( "returns error number when it's not in PresentationStatus enum" , ( ) => { const error = new PresentationError ( 999 ) ; expect ( error . name ) . to . eq ( "Unknown Error (999)" ) ; } ) ; } ) ; } ) ;