@@ -40,43 +40,44 @@ describe('nameCase', function () {
4040} )
4141
4242describe ( 'parseFrom' , function ( ) {
43- it ( 'Travis CI <[email protected] >' , function ( done ) { 43+ it ( 'Travis CI <[email protected] >' , function ( ) { 4444 try {
4545 const r = address . parseFrom ( 'Travis CI <[email protected] >' ) 46- assert . equal ( r [ 0 ] . address , '[email protected] ' ) 47- // console.log(r);
46+ assert . deepEqual ( r [ 0 ] , {
47+ phrase : 'Travis CI' ,
48+ comment : '' ,
49+ 50+ } )
4851 } catch ( e ) {
4952 console . error ( e )
5053 }
51- done ( )
5254 } )
53- it ( 'root (Cron Daemon)' , function ( done ) {
55+
56+ it ( 'root (Cron Daemon)' , function ( ) {
5457 try {
5558 const r = address . parseFrom ( 'root (Cron Daemon)' )
56- assert . equal ( r [ 0 ] . address , '' )
57- // console.log(r);
59+ assert . deepEqual ( r [ 0 ] , { address : '' } )
5860 } catch ( e ) {
5961 assert . equal ( e . message , 'No results' )
6062 }
61- done ( )
6263 } )
6364} )
6465
6566describe ( 'parseSender' , function ( ) {
66- it ( '"Anne Standley, PMPM" <[email protected] >' , function ( done ) { 67+ it ( '"Anne Standley, PMPM" <[email protected] >' , function ( ) { 6768 try {
6869 const r = address . parseSender (
6970 '"Anne Standley, PMPM" <[email protected] >' , 7071 )
71- assert . equal (
72- r [ 0 ] . address ,
73- 74- )
72+ assert . deepEqual ( r [ 0 ] , {
73+ 74+ comment : '' ,
75+ phrase : 'Anne Standley, PMPM' ,
76+ } )
7577 // console.log(r);
7678 } catch ( e ) {
7779 console . error ( e )
7880 }
79- done ( )
8081 } )
8182} )
8283
@@ -86,7 +87,12 @@ describe('parseReplyTo', function () {
8687 const r = address . parseReplyTo (
8788 '=?utf-8?Q?Anne=20Standley=2C=20Protect=20My=20Public=20Media?= <[email protected] >' , 8889 )
89- assert . equal ( r [ 0 ] . address , '[email protected] ' ) 90+ assert . deepEqual ( r [ 0 ] , {
91+ 92+ comment : '' ,
93+ phrase :
94+ '=?utf-8?Q?Anne=20Standley=2C=20Protect=20My=20Public=20Media?=' ,
95+ } )
9096 // console.log(r);
9197 } catch ( e ) {
9298 console . error ( e )
0 commit comments