Browse Source

test: refactor test-fs-watch-stop-async

* use common.mustNotCall() to confirm callback is not invoked
* blank line after common module per test writing guide

PR-URL: https://github.com/nodejs/node/pull/13661
Reviewed-By: Refael Ackermann <refack@gmail.com>
Reviewed-By: Richard Lau <riclau@uk.ibm.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
v6
Rich Trott 8 years ago
parent
commit
f462ad1f35
  1. 3
      test/parallel/test-fs-watch-stop-async.js

3
test/parallel/test-fs-watch-stop-async.js

@ -1,9 +1,10 @@
'use strict';
const common = require('../common');
const assert = require('assert');
const fs = require('fs');
const watch = fs.watchFile(__filename, common.noop);
const watch = fs.watchFile(__filename, common.mustNotCall());
let triggered;
const listener = common.mustCall(() => {
triggered = true;

Loading…
Cancel
Save