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
8 changes: 4 additions & 4 deletions test/pummel/test-watch-file.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,13 @@ const assert = require('assert');
const fs = require('fs');
const path = require('path');

var f = path.join(common.fixturesDir, 'x.txt');
const f = path.join(common.fixturesDir, 'x.txt');

console.log('watching for changes of ' + f);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you please remove console.logs in this file?


var changes = 0;
let changes = 0;
function watchFile() {
fs.watchFile(f, function(curr, prev) {
fs.watchFile(f, (curr, prev) => {
console.log(f + ' change');
changes++;
assert.notDeepStrictEqual(curr.mtime, prev.mtime);
Expand All @@ -24,7 +24,7 @@ function watchFile() {
watchFile();


var fd = fs.openSync(f, 'w+');
const fd = fs.openSync(f, 'w+');
fs.writeSync(fd, 'xyz\n');
fs.closeSync(fd);

Expand Down