Skip to content

Commit

Permalink
Use an ES5 compatible syntax for octal numbers
Browse files Browse the repository at this point in the history
I run tests with Node v0.10 and v0.12 as well. I know that these versions aren't supported anymore, but many projects still use them.
This little change makes the tests run in these versions of Node.
  • Loading branch information
lukasbestle committed Nov 25, 2015
1 parent c1eacd9 commit 6570faa
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions test_lac/loadAndCrash.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -79,9 +79,9 @@ fs.writeFile = function(path, data, options, callback_) {
var callback = maybeCallback(arguments[arguments.length - 1]);

if (!options || typeof options === 'function') {
options = { encoding: 'utf8', mode: 0o666, flag: 'w' };
options = { encoding: 'utf8', mode: 438, flag: 'w' }; // Mode 438 == 0o666 (compatibility with older Node releases)
} else if (typeof options === 'string') {
options = { encoding: options, mode: 0o666, flag: 'w' };
options = { encoding: options, mode: 438, flag: 'w' }; // Mode 438 == 0o666 (compatibility with older Node releases)
} else if (typeof options !== 'object') {
throwOptionsError(options);
}
Expand Down

0 comments on commit 6570faa

Please sign in to comment.