@@ -29,13 +29,13 @@ describe('removeBomStream', function () {
29
29
) ;
30
30
} ) ;
31
31
32
- it ( 'ignores UTF8 buffer without a BOM even if first chunk is shorter than 7 chars but second and subsequent are larger' , function ( done ) {
32
+ it ( 'ignores UTF8 buffer without a BOM even if first chunk is shorter than 7 chars but second and subsequent are larger' , function ( done ) {
33
33
var filepath = path . join ( __dirname , './fixtures/test.txt' ) ;
34
34
var fileContent = fs . readFileSync ( filepath , 'utf-8' ) ;
35
35
36
36
var rmBom = removeBomStream ( ) ;
37
37
var output = '' ;
38
- rmBom . on ( 'data' , function ( d ) {
38
+ rmBom . on ( 'data' , function ( d ) {
39
39
output += d . toString ( ) ;
40
40
} ) ;
41
41
rmBom . write ( Buffer . from ( fileContent . slice ( 0 , 5 ) ) ) ;
@@ -45,7 +45,7 @@ describe('removeBomStream', function () {
45
45
done ( ) ;
46
46
} ) ;
47
47
48
- it ( 'removes the BOM from a UTF8 buffer' , function ( done ) {
48
+ it ( 'removes the BOM from a UTF8 buffer' , function ( done ) {
49
49
var filepath = path . join ( __dirname , './fixtures/bom-utf8.txt' ) ;
50
50
51
51
var expected = fs . readFileSync ( filepath ) . slice ( 3 ) ;
@@ -97,13 +97,13 @@ describe('removeBomStream', function () {
97
97
) ;
98
98
} ) ;
99
99
100
- it ( 'remove the BOM from a UTF8 buffer even if first chunk is shorter than 7 chars but second and subsequent are larger' , function ( done ) {
100
+ it ( 'remove the BOM from a UTF8 buffer even if first chunk is shorter than 7 chars but second and subsequent are larger' , function ( done ) {
101
101
var filepath = path . join ( __dirname , './fixtures/bom-utf8.txt' ) ;
102
102
var fileContent = fs . readFileSync ( filepath , 'utf-8' ) ;
103
103
104
104
var rmBom = removeBomStream ( ) ;
105
105
var output = '' ;
106
- rmBom . on ( 'data' , function ( d ) {
106
+ rmBom . on ( 'data' , function ( d ) {
107
107
output += d . toString ( ) ;
108
108
} ) ;
109
109
rmBom . write ( Buffer . from ( fileContent . slice ( 0 , 5 ) ) ) ;
@@ -113,7 +113,7 @@ describe('removeBomStream', function () {
113
113
done ( ) ;
114
114
} ) ;
115
115
116
- it ( 'does not remove the BOM from a UTF16BE buffer' , function ( done ) {
116
+ it ( 'does not remove the BOM from a UTF16BE buffer' , function ( done ) {
117
117
var filepath = path . join ( __dirname , './fixtures/bom-utf16be.txt' ) ;
118
118
119
119
var expected = fs . readFileSync ( filepath ) ;
0 commit comments