Skip to content
Closed
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
test: use async function for filehandle.read() test
  • Loading branch information
Masashi Hirano
Masashi Hirano committed Oct 10, 2018
commit 464c83a324a5eec50ae4816f0649d364c8581ddb
5 changes: 3 additions & 2 deletions test/parallel/test-fs-read-empty-buffer.js
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,8 @@ assert.throws(
}
);

fsPromises.open(filepath, 'r').then((filehandle) => {
(async () => {
const filehandle = await fsPromises.open(filepath, 'r');
assert.rejects(
() => filehandle.read(buffer, 0, 1, 0),
{
Expand All @@ -37,4 +38,4 @@ fsPromises.open(filepath, 'r').then((filehandle) => {
'Received Uint8Array []'
}
);
});
})();