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

console.log inside QUnit.done does not work in terminal #1308

Closed
lolmaus opened this issue Aug 23, 2018 · 1 comment
Closed

console.log inside QUnit.done does not work in terminal #1308

lolmaus opened this issue Aug 23, 2018 · 1 comment

Comments

@lolmaus
Copy link

lolmaus commented Aug 23, 2018

Tell us about your runtime:

  • QUnit version: 2.4.1
  • What environment are you running QUnit in? (e.g., browser, Node): browser (Chrome headless)
  • How are you running QUnit? (e.g., script, testem, Grunt): Ember CLI 2.18, which is using Testem

What are you trying to do?

Code that reproduces the problem:

QUnit.done(() => console.log("foo"));

This code is executed in the browser environment. I have no access to Node features from there.

What did you expect to happen?

The log message is visible when I run tests with the terminal output (via ember test --serve, which is using Chrome headless).

What actually happened?

The log message is only visible when I run tests in browser (ember test --serve). When I run tests in the terminal (ember test), the log message is not visible. It does not appear in the CI.

console.logs made during test execution do appear in the terminal. But my goal is to collect some stats about tests and spit them out after all tests complete.

@trentmwillis
Copy link
Member

This isn't an issue with QUnit but with the testing setup provided by Ember-CLI.

In particular, Testem requires you use an adapter to bridge the browser-node communication gap. By default it provides a QUnit adapter that sends the necessary reporting info for tests. You might need to extend that adapter or define your own as mentioned here.

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

No branches or pull requests

3 participants