Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 7055764

Browse files
authored
test: remove tests/lib/eslint/eslint.config.js (#20065)
1 parent 10e7ae2 commit 7055764

File tree

2 files changed

+5
-7
lines changed

2 files changed

+5
-7
lines changed

tests/lib/eslint/eslint.config.js renamed to tests/fixtures/configurations/cwd/eslint.config.js

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
/* eslint strict: off -- config used for testing only */
2-
31
module.exports = {
42
rules: {
53
quotes: 2,

tests/lib/eslint/eslint.js

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -201,14 +201,14 @@ describe("ESLint", () => {
201201
});
202202

203203
it("the default value of 'options.cwd' should be the current working directory.", async () => {
204-
process.chdir(__dirname);
204+
process.chdir(fixtureDir);
205205
try {
206206
const engine = new ESLint({ flags });
207-
const results = await engine.lintFiles("eslint.js");
207+
const results = await engine.lintFiles("passing.js");
208208

209209
assert.strictEqual(
210210
path.dirname(results[0].filePath),
211-
__dirname,
211+
fixtureDir,
212212
);
213213
} finally {
214214
process.chdir(originalDir);
@@ -629,7 +629,7 @@ describe("ESLint", () => {
629629
it("should report the total and per file errors when using local cwd eslint.config.js", async () => {
630630
eslint = new ESLint({
631631
flags,
632-
cwd: __dirname,
632+
cwd: getFixturePath("configurations", "cwd"),
633633
});
634634

635635
const results = await eslint.lintText("var foo = 'bar';");
@@ -13490,7 +13490,7 @@ describe("ESLint", () => {
1349013490
const originalCwd = process.cwd();
1349113491

1349213492
beforeEach(() => {
13493-
process.chdir(__dirname);
13493+
process.chdir(fixtureDir);
1349413494
});
1349513495

1349613496
afterEach(() => {

0 commit comments

Comments
 (0)