test: fix test/pummel/test-fs-watch-file.js
test-fs-watch-file.js fails for two reasons. First, there are cases where it is checking the error message for an error whose message has changed since the test was written. Change these instances to check for an error code instead.
Second, there is an instance where it tries to remove a listener but
fails because common.mustNotCall()
returns a differnet instance of a
function on each call. Store the function in a variable name so it can
be removed as a listener on a file.
Checklist
-
make -j4 test
(UNIX), orvcbuild test
(Windows) passes -
commit message follows commit guidelines