File tree Expand file tree Collapse file tree 2 files changed +5
-7
lines changed
fixtures/configurations/cwd Expand file tree Collapse file tree 2 files changed +5
-7
lines changed Original file line number Diff line number Diff line change 1
- /* eslint strict: off -- config used for testing only */
2
-
3
1
module . exports = {
4
2
rules : {
5
3
quotes : 2 ,
Original file line number Diff line number Diff line change @@ -201,14 +201,14 @@ describe("ESLint", () => {
201
201
} ) ;
202
202
203
203
it ( "the default value of 'options.cwd' should be the current working directory." , async ( ) => {
204
- process . chdir ( __dirname ) ;
204
+ process . chdir ( fixtureDir ) ;
205
205
try {
206
206
const engine = new ESLint ( { flags } ) ;
207
- const results = await engine . lintFiles ( "eslint .js" ) ;
207
+ const results = await engine . lintFiles ( "passing .js" ) ;
208
208
209
209
assert . strictEqual (
210
210
path . dirname ( results [ 0 ] . filePath ) ,
211
- __dirname ,
211
+ fixtureDir ,
212
212
) ;
213
213
} finally {
214
214
process . chdir ( originalDir ) ;
@@ -629,7 +629,7 @@ describe("ESLint", () => {
629
629
it ( "should report the total and per file errors when using local cwd eslint.config.js" , async ( ) => {
630
630
eslint = new ESLint ( {
631
631
flags,
632
- cwd : __dirname ,
632
+ cwd : getFixturePath ( "configurations" , "cwd" ) ,
633
633
} ) ;
634
634
635
635
const results = await eslint . lintText ( "var foo = 'bar';" ) ;
@@ -13490,7 +13490,7 @@ describe("ESLint", () => {
13490
13490
const originalCwd = process . cwd ( ) ;
13491
13491
13492
13492
beforeEach ( ( ) => {
13493
- process . chdir ( __dirname ) ;
13493
+ process . chdir ( fixtureDir ) ;
13494
13494
} ) ;
13495
13495
13496
13496
afterEach ( ( ) => {
You can’t perform that action at this time.
0 commit comments