Skip to content

Commit

Permalink
prettier
Browse files Browse the repository at this point in the history
  • Loading branch information
graue committed Dec 2, 2024
1 parent 5734a60 commit 3a44eab
Showing 1 changed file with 17 additions and 17 deletions.
34 changes: 17 additions & 17 deletions src/__tests__/volume.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1449,24 +1449,24 @@ describe('volume', () => {
const vol = Volume.fromJSON({
'/test.txt': 'Hello',
});
vol.promises.open('/test.txt', 'r').then(fh => {
const readStream = vol.createReadStream(
'/this/should/be/ignored',
{ fd: fh },
);
readStream.setEncoding('utf8');
let readData = '';
readStream.on('readable', () => {
const chunk = readStream.read();
if (chunk != null) readData += chunk;
});
readStream.on('end', () => {
expect(readData).toEqual('Hello');
done();
vol.promises
.open('/test.txt', 'r')
.then(fh => {
const readStream = vol.createReadStream('/this/should/be/ignored', { fd: fh });
readStream.setEncoding('utf8');
let readData = '';
readStream.on('readable', () => {
const chunk = readStream.read();
if (chunk != null) readData += chunk;
});
readStream.on('end', () => {
expect(readData).toEqual('Hello');
done();
});
})
.catch(err => {
expect(err).toBeNull();
});
}).catch((err) => {
expect(err).toBeNull();
});
});
});
});

0 comments on commit 3a44eab

Please sign in to comment.