File tree Expand file tree Collapse file tree 2 files changed +3
-5
lines changed Expand file tree Collapse file tree 2 files changed +3
-5
lines changed Original file line number Diff line number Diff line change @@ -63,11 +63,11 @@ describe("fs module", () => {
6363 } ) ;
6464 it ( "read file" , done => {
6565 fs . mkdir ( "/readFile" , err => {
66- fs . writeFile ( "/readFile/readFile-buffer .txt" , "HELLO" , err => {
66+ fs . writeFile ( "/readFile/readFile-uint8 .txt" , "HELLO" , err => {
6767 expect ( err ) . toBe ( null ) ;
68- fs . readFile ( "/readFile/readFile-buffer .txt" , ( err , data ) => {
68+ fs . readFile ( "/readFile/readFile-uint8 .txt" , ( err , data ) => {
6969 expect ( err ) . toBe ( null ) ;
70- expect ( data ) . toEqual ( Buffer . from ( HELLO ) ) ;
70+ expect ( data ) . toEqual ( HELLO ) ;
7171 done ( ) ;
7272 } ) ;
7373 } ) ;
Original file line number Diff line number Diff line change @@ -105,8 +105,6 @@ module.exports = class FS {
105105 if ( data ) {
106106 if ( encoding === "utf8" ) {
107107 data = decode ( data ) ;
108- } else {
109- data = Buffer . from ( data ) ;
110108 }
111109 }
112110 cb ( null , data ) ;
You can’t perform that action at this time.
0 commit comments