Skip to content

Commit

Permalink
Chore: avoid using globals in CLIEngine tests (#9242)
Browse files Browse the repository at this point in the history
  • Loading branch information
not-an-aardvark committed Sep 6, 2017
1 parent c8bf687 commit 583f0b8
Showing 1 changed file with 3 additions and 7 deletions.
10 changes: 3 additions & 7 deletions tests/lib/cli-engine.js
Expand Up @@ -19,12 +19,8 @@ const assert = require("chai").assert,
os = require("os"),
hash = require("../../lib/util/hash");

require("shelljs/global");

const proxyquire = require("proxyquire").noCallThru().noPreserveCache();

/* global mkdir, rm, cp */

//------------------------------------------------------------------------------
// Tests
//------------------------------------------------------------------------------
Expand Down Expand Up @@ -87,8 +83,8 @@ describe("CLIEngine", () => {
// copy into clean area so as not to get "infected" by this project's .eslintrc files
before(() => {
fixtureDir = path.join(os.tmpdir(), "/eslint/fixtures");
mkdir("-p", fixtureDir);
cp("-r", "./tests/fixtures/.", fixtureDir);
shell.mkdir("-p", fixtureDir);
shell.cp("-r", "./tests/fixtures/.", fixtureDir);
fixtureDir = fs.realpathSync(fixtureDir);
});

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

after(() => {
rm("-r", fixtureDir);
shell.rm("-r", fixtureDir);
});

describe("new CLIEngine(options)", () => {
Expand Down

0 comments on commit 583f0b8

Please sign in to comment.