File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -61,15 +61,18 @@ describe('instrument', () => {
6161 } ) ;
6262
6363 it ( 'should return a Latin-1 safe user agent when process.title contains non-Latin-1 characters' , ( ) => {
64- const notLatin1SafeTitle = '管理者: Windows PowerShell'
64+ const notLatin1SafeTitle = '管理者: Windows PowerShell' ;
6565 assert . strictEqual ( isLatin1Safe ( notLatin1SafeTitle ) , false ) ;
6666
6767 mockProcessTitle ( notLatin1SafeTitle ) ;
6868 const { getUserAgent } = freshImport ( ) ;
6969 const ua = getUserAgent ( ) ;
7070 assert . ok ( isLatin1Safe ( ua ) , `User-Agent contains non-Latin-1 characters: ${ ua } ` ) ;
7171 assert . ok ( ! ua . includes ( notLatin1SafeTitle ) , 'User-Agent should not contain raw non-ASCII characters' ) ;
72- assert . ok ( ua . includes ( '%E7%AE%A1%E7%90%86%E8%80%85: Windows PowerShell' ) , 'User-Agent should percent-encode only non-Latin-1 characters' ) ;
72+ assert . ok (
73+ ua . includes ( '%E7%AE%A1%E7%90%86%E8%80%85: Windows PowerShell' ) ,
74+ 'User-Agent should percent-encode only non-Latin-1 characters' ,
75+ ) ;
7376 } ) ;
7477
7578 it ( 'should preserve Latin-1 characters in process.title' , ( ) => {
Original file line number Diff line number Diff line change @@ -10,7 +10,7 @@ function replaceSlashes(s: string): string {
1010 return s . replace ( '/' , ':' ) ;
1111}
1212
13- const MAX_LATIN1_CODE = 0xFF ;
13+ const MAX_LATIN1_CODE = 0xff ;
1414
1515/**
1616 * Ensures a string is safe for use in HTTP headers by URI-encoding characters outside the Latin-1 (ISO-8859-1) range.
You can’t perform that action at this time.
0 commit comments