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

DeprecationWarning in Node 7 when using browserConsoleLogOptions.path. #2763

Closed
chrahunt opened this issue Jul 9, 2017 · 2 comments
Closed

Comments

@chrahunt
Copy link
Contributor

chrahunt commented Jul 9, 2017

Expected behaviour

Executing test with config that includes browserConsoleLogOptions with path will successully (and quietly) write browser console to the given path.

Actual behaviour

Each time browser console is written to path, a DeprecationWarning appears:

(node:3804) [DEP0013] DeprecationWarning: Calling an asynchronous function without callback is deprecated.

Running using node --trace-warnings node_modules/.bin/karma gives:

(node:12822) DeprecationWarning: Calling an asynchronous function without callback is deprecated.
    at maybeCallback (fs.js:98:42)
    at Object.fs.write (fs.js:729:14)
    at Server.<anonymous> (.../node_modules/karma/lib/server.js:231:10)
    at emitThree (events.js:121:20)
    at Server.emit (events.js:197:7)
    at Browser.onInfo (.../node_modules/karma/lib/browser.js:112:15)
    at Socket.<anonymous> (.../node_modules/karma/lib/events.js:13:22)
    at emitOne (events.js:96:13)
    at Socket.emit (events.js:191:7)
    at .../node_modules/socket.io/lib/socket.js:503:12
    at _combinedTickCallback (internal/process/next_tick.js:73:7)
    at process._tickCallback (internal/process/next_tick.js:104:9)

The relevant line here is Server.<anonymous> (.../node_modules/karma/lib/server.js:231:10). The code in question.

Environment Details

  • Karma version (output of karma --version): Karma version: 1.7.0
  • Relevant part of your karma.config.js file:
browserConsoleLogOptions: {
  level: 'debug',
  path: 'karma-out.log',
  terminal: false
}

This is with node v7.10.0.

Steps to reproduce the behaviour

git clone [email protected]:chrahunt/TagProReplays.git \
&& git checkout 5da3cb5                             \
&& npm test

Based on the docs we should be waiting for the callback between writes or using fs.createWriteStream.

@chrahunt
Copy link
Contributor Author

Blocked on #2765 since those are the relevant tests for the changes needed here.

@chrahunt
Copy link
Contributor Author

Fixed by #2939.

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

1 participant