@@ -62,40 +62,39 @@ describe('auth', async function() {
6262 await runAuthScript (
6363 { } ,
6464 [ FIRST_TIME_MSG ] ,
65- ' Could not get token: Bad credentials\n' , 'run-auth-error'
65+ / C o u l d n o t g e t t o k e n : B a d c r e d e n t i a l s \n / , 'run-auth-error'
6666 ) ;
6767 } ) ;
6868
6969 it ( 'does not accept a non-string username' , async function ( ) {
7070 await runAuthScript (
7171 { HOME : { username : { } , token : '0123456789abcdef' } } ,
7272 [ ] ,
73- ' username must be a string, received object\n'
73+ / u s e r n a m e m u s t b e a s t r i n g , r e c e i v e d o b j e c t \n /
7474 ) ;
7575 } ) ;
7676
7777 it ( 'does not accept a non-string token' , async function ( ) {
7878 await runAuthScript (
7979 { HOME : { username : 'nyancat' , token : 42 } } ,
8080 [ ] ,
81- ' token must be a string, received number\n'
81+ / t o k e n m u s t b e a s t r i n g , r e c e i v e d n u m b e r \n /
8282 ) ;
8383 } ) ;
8484
8585 it ( 'does not accept an invalid username format' , async function ( ) {
8686 await runAuthScript (
8787 { HOME : { username : ' ^^^ ' , token : '0123456789abcdef' } } ,
8888 [ ] ,
89- 'username may only contain alphanumeric characters or hyphens, ' +
90- 'received ^^^ \n'
89+ / u s e r n a m e m a y o n l y c o n t a i n a l p h a n u m e r i c c h a r a c t e r s o r h y p h e n s , r e c e i v e d \^ \^ \^ \n /
9190 ) ;
9291 } ) ;
9392
9493 it ( 'does not accept an invalid token format' , async function ( ) {
9594 await runAuthScript (
9695 { HOME : { username : 'nyancat' , token : '@fhqwhgads' } } ,
9796 [ ] ,
98- ' token is misformatted: @fhqwhgads\n'
97+ / t o k e n i s m i s f o r m a t t e d : @ f h q w h g a d s \n /
9998 ) ;
10099 } ) ;
101100
0 commit comments