1'use strict';
2const common = require('../common');
3const tmpdir = require('../common/tmpdir');
4const fs = require('fs');
5const path = require('path');
6
7tmpdir.refresh();
8
9{
10  // Should warn when trying to delete a nonexistent path
11  common.expectWarning(
12    'DeprecationWarning',
13    'In future versions of Node.js, fs.rmdir(path, { recursive: true }) ' +
14      'will be removed. Use fs.rm(path, { recursive: true }) instead',
15    'DEP0147'
16  );
17  fs.rmdir(
18    path.join(tmpdir.path, 'noexist.txt'),
19    { recursive: true },
20    common.mustCall()
21  );
22}
23