jcubic
jcubic

Reputation: 66560

How to get stacktrace on error in jasmine-node?

I'm running jasmine-node using:

node_modules/jasmine-node/bin/jasmine-node --verbose --junitreport --noColor spec

but got error:

Exception loading: /home/kuba/projects/jcubic/terminal/repo/spec/terminalSpec.js
[TypeError: Cannot read property 'extend' of undefined]

Why it don't show stack trace? I'm including jsdom and jquery with the code:

if (typeof window === 'undefined') {
    var jsdom = require("jsdom").jsdom;
    global.window = jsdom().parentWindow;
    global.jQuery = global.$ = require("jquery")(window);
    require('../js/jquery.terminal-src');
}

Anybody have a clue why I got this error, the terminalSpec.js file is on github.

Upvotes: 0

Views: 606

Answers (1)

jcubic
jcubic

Reputation: 66560

Found the option by checking the source code:

--captureExceptions

Upvotes: 2

Related Questions