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

Why i always gets a DeprecationWarning? #107

Closed
RedTailBullet opened this issue Jan 4, 2017 · 3 comments
Closed

Why i always gets a DeprecationWarning? #107

RedTailBullet opened this issue Jan 4, 2017 · 3 comments

Comments

@RedTailBullet
Copy link

RedTailBullet commented Jan 4, 2017

i always get this warning:
DeprecationWarning: Calling an asynchronous function without callback is deprecated.
i trace it an it's stack is:

(node:73406) DeprecationWarning: Calling an asynchronous function without callback is deprecated.
    at makeCallback (fs.js:103:12)
    at Object.fs.close (fs.js:521:20)
    at saveToFile (/Users/Sherlock/repositories/test_data/node_modules/mochawesome/lib/reportGenerator.js:82:8)
    at Runner.<anonymous> (/Users/Sherlock/repositories/test_data/node_modules/mochawesome/lib/mochawesome.js:111:9)
    at emitNone (events.js:91:20)
    at Runner.emit (events.js:185:7)
    at /Users/Sherlock/repositories/test_data/node_modules/mocha/lib/runner.js:813:12
    at /Users/Sherlock/repositories/test_data/node_modules/mocha/lib/runner.js:661:9
    at next (/Users/Sherlock/repositories/test_data/node_modules/mocha/lib/runner.js:295:14)
    at Immediate.<anonymous> (/Users/Sherlock/repositories/test_data/node_modules/mocha/lib/runner.js:339:5)

How can i solve this warning? It's annoying.

@adamgruber
Copy link
Owner

adamgruber commented Jan 11, 2017

Haven't seen that warning. Can you provide some more info (mocha version, node version, etc) or some example code where this is happening?

@adamgruber
Copy link
Owner

So, this warning was added to node v7 and its coming from the reportGenerator.js file that calls fs.close. Should be an easy fix just changing it to fs.closeSync. I'll try to get this done and cut a release in the next day or two. Maybe sooner.

Have you considered upgrading to mochawesome v2?

@adamgruber
Copy link
Owner

Just released 1.5.5. Should fix things.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants