import { expect } from '@loopback/testlab' ; import { Principal , securityId , TypedPrincipal } from '../..' ; describe ( 'typed principal' , ( ) => { it ( 'returns the security id' , ( ) => { const principal = { [ securityId ] : 'auser' } ; const typedPrincipal = new TypedPrincipal ( principal , 'USER' ) ; expect ( typedPrincipal [ securityId ] ) . to . eql ( 'USER:auser' ) ; } ) ; } ) ;