Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Not passed test #7799

Closed
Scrum opened this issue Dec 20, 2016 · 12 comments · Fixed by #8070
Closed

Not passed test #7799

Scrum opened this issue Dec 20, 2016 · 12 comments · Fixed by #8070
Labels
accepted There is consensus among the team that this change meets the criteria for inclusion archived due to age This issue has been archived; please open a new issue for any further discussion bug ESLint is working incorrectly infrastructure Relates to the tools used in the ESLint development process

Comments

@Scrum
Copy link

Scrum commented Dec 20, 2016

Not passed test cli when supplied with report output file path should write the file and create dirs if they don't exist:

Tell us about your environment

  • **ESLint Version: 3.12.2
  • **Node Version: 7.2.0
  • **npm Version: 3.10.9

**What parser (default, Babel-ESLint, etc.) are you using? Default

What did you do? Please include the actual source code causing the issue.

$ npm test

What did you expect to happen?

all passed tests

What actually happened? Please include the actual, raw output from ESLint.

  13566 passing (1m)
  1 failing

  1) cli when supplied with report output file path should write the file and create dirs if they don't exist:
     AssertionError: expected '\nC:\\Users\\ivdemidov\\AppData\\Local\\Temp\\eslint\\fixtures\\single-quoted.js\n  1:13  warning  Strings must use doublequote  quotes\n\n✖ 1 problem (0 errors, 1 warning)\n' to include 'C:\\Users\\IVDEMI~1\\AppData\\Local\\Temp\\eslint\\fixtures\\single-quoted.js'
      at Function.assert.include (D:\sand-box\git\eslint\node_modules\chai\lib\chai\interface\assert.js:843:45)
      at Context.it (D:\sand-box\git\eslint\tests\lib\cli.js:541:20)
      at callFn (D:\sand-box\git\eslint\node_modules\mocha\lib\runnable.js:326:21)
      at Test.Runnable.run (D:\sand-box\git\eslint\node_modules\mocha\lib\runnable.js:319:7)
      at Runner.runTest (D:\sand-box\git\eslint\node_modules\mocha\lib\runner.js:422:10)
      at D:\sand-box\git\eslint\node_modules\mocha\lib\runner.js:528:12
      at next (D:\sand-box\git\eslint\node_modules\mocha\lib\runner.js:342:14)
      at D:\sand-box\git\eslint\node_modules\mocha\lib\runner.js:352:7
      at next (D:\sand-box\git\eslint\node_modules\mocha\lib\runner.js:284:14)
      at Immediate.<anonymous> (D:\sand-box\git\eslint\node_modules\mocha\lib\runner.js:320:5)



=============================================================================
Writing coverage object [D:\sand-box\git\eslint\coverage\coverage.json]
Writing coverage reports at [D:\sand-box\git\eslint\coverage]
=============================================================================

=============================== Coverage summary ===============================
Statements   : 99.48% ( 11563/11624 ), 147 ignored
Branches     : 98.2% ( 8891/9054 ), 75 ignored
Functions    : 99.9% ( 1999/2001 ), 22 ignored
Lines        : 99.47% ( 11490/11551 )
================================================================================

START:
20 12 2016 16:17:43.628:WARN [karma]: Port 9876 in use
20 12 2016 16:17:43.631:INFO [karma]: Karma v0.13.22 server started at http://localhost:9877/
20 12 2016 16:17:43.636:INFO [launcher]: Starting browser PhantomJS
20 12 2016 16:17:45.261:INFO [PhantomJS 2.1.1 (Windows 8 0.0.0)]: Connected on socket ep7LPmVfCAehOM8-AAAA with id 88475412

Finished in 0.644 secs / 0.589 secs

SUMMARY:
√ 233 tests completed
npm ERR! Test failed.  See above for more details.
@eslintbot eslintbot added the triage An ESLint team member will look at this issue soon label Dec 20, 2016
@platinumazure
Copy link
Member

Not just me then! Excellent. I can reproduce this in my machine and I have Node 7.x as well. (I only started seeing this issue when I upgraded my Node version.)

@platinumazure platinumazure added accepted There is consensus among the team that this change meets the criteria for inclusion bug ESLint is working incorrectly infrastructure Relates to the tools used in the ESLint development process and removed triage An ESLint team member will look at this issue soon labels Dec 20, 2016
@gyandeeps
Copy link
Member

Wasn't able to reproduce this on

  • Windows 10
  • Node - 7.2.0

@platinumazure
Copy link
Member

@gyandeeps It also seems to depend on one's directory structure. In both OP's and my case, our ESLint project is in a user folder and our usernames are both longer than 8 characters. It's probably situational and has to do with how Windows normalizes path names.

@not-an-aardvark
Copy link
Member

Does the issue still occur if you change this line to use path.resolve.apply instead of path.join.apply?

@platinumazure
Copy link
Member

@not-an-aardvark I'll give that a try at some point in the next few days. Thanks for the suggestion!

@kaicataldo
Copy link
Member

@platinumazure Any luck with this?

@platinumazure
Copy link
Member

platinumazure commented Jan 10, 2017 via email

@kaicataldo
Copy link
Member

@platinumazure Thanks for the update 👍

@mysticatea
Copy link
Member

I had not reproduced this on my shell (GitHub Shell of GitHub Desktop for Windows) for long time. But today, I found this happens on cmd.exe.
(My project path is C:\Users\t-nagashima.AD\Documents\GitHub\eslint)

As a workaround for now, maybe you can use GitHub Shell :)

@mysticatea
Copy link
Member

I'm not sure why, but it reproduced with mocha .\tests\lib\*.js --reporter progress, but it did not reproduce with mocha .\tests\lib\cli.js --reporter progress.

@mysticatea
Copy link
Member

It reproduced with mocha .\tests\lib\{cli,config}.js --reporter progress

@mysticatea
Copy link
Member

It seems to be fixed if I remove require("mock-fs") from tests/lib/config.js.

@eslint-deprecated eslint-deprecated bot locked and limited conversation to collaborators Feb 6, 2018
@eslint-deprecated eslint-deprecated bot added the archived due to age This issue has been archived; please open a new issue for any further discussion label Feb 6, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
accepted There is consensus among the team that this change meets the criteria for inclusion archived due to age This issue has been archived; please open a new issue for any further discussion bug ESLint is working incorrectly infrastructure Relates to the tools used in the ESLint development process
Projects
None yet
Development

Successfully merging a pull request may close this issue.

7 participants