From 21b3f3f31f9e138f9dded5d60e9f2e90bf4216cb Mon Sep 17 00:00:00 2001 From: Ujjwal Sharma Date: Tue, 6 Mar 2018 11:57:06 +0530 Subject: [PATCH] test: rename test-regress-GH-4027 Rename the test appropriately alongside mentioning the subsystem Also, make a few basic changes to make sure the test conforms to the standard test structure Refs: https://github.com/nodejs/node/issues/19105 Refs: https://github.com/nodejs/node/blob/master/doc/guides/writing-tests.md#test-structure PR-URL: https://github.com/nodejs/node/pull/19161 Reviewed-By: James M Snell Reviewed-By: Ruben Bridgewater Reviewed-By: Joyee Cheung Reviewed-By: Richard Lau Reviewed-By: Gireesh Punathil --- ...gress-GH-4027.js => test-regress-fs-watch_file.js} | 11 +++++++++++ 1 file changed, 11 insertions(+) rename test/sequential/{test-regress-GH-4027.js => test-regress-fs-watch_file.js} (81%) diff --git a/test/sequential/test-regress-GH-4027.js b/test/sequential/test-regress-fs-watch_file.js similarity index 81% rename from test/sequential/test-regress-GH-4027.js rename to test/sequential/test-regress-fs-watch_file.js index 8936537323581e..f5b9012acabe58 100644 --- a/test/sequential/test-regress-GH-4027.js +++ b/test/sequential/test-regress-fs-watch_file.js @@ -21,6 +21,17 @@ 'use strict'; const common = require('../common'); + +// Make sure the deletion event gets reported in the following scenario: +// 1. Watch a file. +// 2. The initial stat() goes okay. +// 3. Something deletes the watched file. +// 4. The second stat() fails with ENOENT. + +// The second stat() translates into the first 'change' event but a logic error +// stopped it from getting emitted. +// https://github.com/nodejs/node-v0.x-archive/issues/4027 + const assert = require('assert'); const path = require('path'); const fs = require('fs');