Skip to content

Commit 583f0b8

Browse files
Chore: avoid using globals in CLIEngine tests (#9242)
1 parent c8bf687 commit 583f0b8

File tree

1 file changed

+3
-7
lines changed

1 file changed

+3
-7
lines changed

tests/lib/cli-engine.js

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -19,12 +19,8 @@ const assert = require("chai").assert,
1919
os = require("os"),
2020
hash = require("../../lib/util/hash");
2121

22-
require("shelljs/global");
23-
2422
const proxyquire = require("proxyquire").noCallThru().noPreserveCache();
2523

26-
/* global mkdir, rm, cp */
27-
2824
//------------------------------------------------------------------------------
2925
// Tests
3026
//------------------------------------------------------------------------------
@@ -87,8 +83,8 @@ describe("CLIEngine", () => {
8783
// copy into clean area so as not to get "infected" by this project's .eslintrc files
8884
before(() => {
8985
fixtureDir = path.join(os.tmpdir(), "/eslint/fixtures");
90-
mkdir("-p", fixtureDir);
91-
cp("-r", "./tests/fixtures/.", fixtureDir);
86+
shell.mkdir("-p", fixtureDir);
87+
shell.cp("-r", "./tests/fixtures/.", fixtureDir);
9288
fixtureDir = fs.realpathSync(fixtureDir);
9389
});
9490

@@ -97,7 +93,7 @@ describe("CLIEngine", () => {
9793
});
9894

9995
after(() => {
100-
rm("-r", fixtureDir);
96+
shell.rm("-r", fixtureDir);
10197
});
10298

10399
describe("new CLIEngine(options)", () => {

0 commit comments

Comments
 (0)