0
0
mirror of https://github.com/nodejs/node.git synced 2024-12-01 16:10:02 +01:00

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>
This commit is contained in:
Rich Trott 2017-06-13 09:51:38 -07:00
parent 14f5a9becc
commit f462ad1f35

View File

@ -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;