Console.log is not working in Qunit tests with grunt server
Asked Answered
W

1

7

I am creating Qunit tests which are running on grunt server. In the test when I am trying to use "console.log" to log some output to the console, it is not printing anything in the console. Currently I am able to use only OK to perform the assertions.

Please give your inputs.

Wriggly answered 2/1, 2014 at 10:19 Comment(2)
did u try QUnit.log()?? api.qunitjs.com/QUnit.logCandycecandystriped
I tried but it is not working in my script..Wriggly
D
4

If you are using the qunit task in grunt, you need to start the task with --debug (i.e. grunt test --debug). You will then see phantom logs printing out your console logs in the following format:

[D] ["phantomjs","console","MIXPANEL PEOPLE REQUEST (QUEUED, PENDING IDENTIFY):"]

See documentation

Disquiet answered 20/1, 2014 at 0:54 Comment(1)
Thanks - but that sure does create a lot of very noisy output. Still, better than no logs at all.Publisher

© 2022 - 2024 — McMap. All rights reserved.