Skip to content

logs during test runs / jasmine-node compatability #217

@dcsan

Description

@dcsan

i'm using jasmine-node and trying to use logs to debug some of my tests, however they don't seem to be output anywhere...

since jasmine-node is not a normal node app, is there some config that is not being set?

I also tried sending errors/output to stderr and using 3> to try and capture it but without luck.

I added this to the top of a test suite and

var debug = require("debug") 
var error = debug('mbot:error');
var log = debug('mbot:log');

// set this namespace to log via console.log
log.log = console.log.bind(console); // don't forget to bind to console!
log('goes to stdout');
error("ERROR")

and running it with:

DEBUG="mbot:*" jasmine-node --color $FILE --watch --autotest 3> logs/test.log

without anything showing up either during test runs or in test.log

any other methods to get this working? dont wanna have to go back to console.log!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions