Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix invalid strict-mode syntax with fs constants #7

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
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
7 changes: 6 additions & 1 deletion test/terminate-read.js
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,12 @@ test('after 10k times, cb order is always correct', function (t) {
return t.end()
}

var fd = fs.openSync(__filename, 'r+', 0666)
const ownerReadWrite = fs.constants.S_IRUSR + fs.constants.S_IWUSR
const groupReadWrite = fs.constants.S_IRGRP + fs.constants.S_IWGRP
const otherReadWrite = fs.constants.S_IROTH + fs.constants.S_IWOTH
const fileMode = ownerReadWrite + groupReadWrite + otherReadWrite

var fd = fs.openSync(__filename, 'r+', fileMode)
var data, closed

//create a file stream with a fixed fd,
Expand Down