From 5d506e0431826c991f592f1975d5c746b048147b Mon Sep 17 00:00:00 2001 From: Teddy Katz Date: Thu, 9 May 2019 22:51:52 -0400 Subject: [PATCH] Chore: fix CLIEngine tests when os.tmpdir is a symlink Previously, this was causing test failures on macOS because some parts of the CLIEngine tests call realpath() and others didn't. --- tests/lib/cli-engine.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/lib/cli-engine.js b/tests/lib/cli-engine.js index 2e609a65061..ba2d85727a0 100644 --- a/tests/lib/cli-engine.js +++ b/tests/lib/cli-engine.js @@ -40,7 +40,7 @@ describe("CLIEngine", () => { }, examplePreprocessorName = "eslint-plugin-processor", originalDir = process.cwd(), - fixtureDir = path.resolve(os.tmpdir(), "eslint/fixtures"); + fixtureDir = path.resolve(fs.realpathSync(os.tmpdir()), "eslint/fixtures"); /** @type {import("../../lib/cli-engine")["CLIEngine"]} */ let CLIEngine;