Integration of Jasmine Spec framework with Node.js
Questions tagged [jasmine-node]
327 questions
0
votes
0 answers
Running Jasmine tests from Node against code that uses RequireJS
Is it possible to run Jasmine from Node to test code that uses RequireJS?
I am using the Jasmine NPM. I can run some tests from Node but can't work out how to test my code that uses RequireJS.
V2 of jasmine-node (that supports Jasmine 2.x) has had…

James
- 71
- 4
0
votes
1 answer
Jasmin test if callback parameter is called
so i have a function which checks if a checksum is changed and if so it calls the callback which is provided by a parameter.
var watchFileChange = function watchFileChange(oldChecksum, callback){
// some code about checking checksum
…

BitKoch
- 31
- 7
0
votes
1 answer
Prevent supertest from running until express server has started
I have an node / express js app that was generated using the yoman full stack generator. I have swapped out mongo / mongoose for cloudant db (which is just a paid for version of couchdb). I have a written a wrapper for the Cloudant node.js library…

springdo
- 43
- 5
0
votes
1 answer
jasmine-node fails but only reports it in "summary"
I am running jasmine-node and encountered something really strange. Successful tests but failures in report:
.........
Finished in 0.142 seconds
9 tests, 11 assertions, 2 failures, 0 skipped
I am using done("error") to flag a failure.

Andreas Selenwall
- 5,705
- 11
- 45
- 58
0
votes
1 answer
Stub not getting called in jasmine unit test
function fun{
A.B.C().D(someconstant);
$(element).prop("checked",false).trigger("change");
}
describe(()=>{
let triggerStub: Sinon.SinonStub;
let Dstub: Sinon.SinonStub;
beforeEach(() => {
…

user2597100
- 97
- 1
- 10
0
votes
1 answer
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…

jcubic
- 61,973
- 54
- 229
- 402
0
votes
1 answer
Jenkins jasmine-node command not found
I am trying to configure Jenkins to be used for my team which works on node.js projects. We used jasmine-node for most of our projects.
I have a jenkins instance managed by another group in the org which recognizes node and npm.
I ran 'npm install…

Rookie
- 5,179
- 13
- 41
- 65
0
votes
1 answer
Jasmine unit-testing on Titanium module
I am currently trying jasmine-node to unit test my Titanium app. I am open to suggestions about switching to an other unit-testing framework if it can solve my problem but first, here is my question.
My installation of jasmine-node is working, I can…

midemarc
- 113
- 1
- 1
- 12
0
votes
1 answer
Jasmine: how to run all tests providing each time a different context?
I would like to know how I could provide an array of variables and let Jasmine run all the tests using each time one of those values.
For the story :
I am using jasmine and webdriver to test our website. Webdriver is an automation tool to open a…

Flavien Volken
- 19,196
- 12
- 100
- 133
0
votes
1 answer
jasmine-node, pass just one spec file as argument
require('jasmine-node')
describe( "hello world", function() {
it( "a simple app", function(){
expect("1").toEqual("1")
console.log("this is a simpler application")
});
});
I am trying to run the above helloworld program using…
user2879704
0
votes
1 answer
jasmine-node runs only one spec file from 'spec' folder
I've written 3 spec files, each of them is designed for separate modules. The folder structure is:
|-spec
|-module1.spec.js
|-module2.spec.js
|-module3.spec.js
Command jasmine-node --teamcity spec/ somehow runs only for the first…

Ostap Lisovyj
- 180
- 2
- 17
0
votes
1 answer
callbacks in jasmine E2E testing using restler
I am testing restful api's using restler and jasmine nodejs modules . I have created test files to test a single api call and test group of api calls that need input from each other . How can I provide the feedback / output from one such api call to…

Siddharth Sharma
- 1,653
- 2
- 19
- 35
0
votes
1 answer
Jasmine: how to run series of tests after an event has triggered
I'm trying to run tests on my npm module. The code below will work if I comment out either of the 2 it blocks, but times out if I leave them both in as below. How can wait for "ready" before running my tests (I'd like to add more but they too need…

Simon H
- 20,332
- 14
- 71
- 128
0
votes
1 answer
Jasmine with Coffeescript Unexpected string Syntax error
I'm trying Jasmine in Coffeescript but when i call jasmine in the terminal, I get this error:
/home/luca/tries/sourcemaps-demo/spec/mainSpec.coffee:1
nction (exports, require, module, __filename, __dirname) { describe 'A suite',
…

cl0udw4lk3r
- 2,663
- 5
- 26
- 46
0
votes
1 answer
Can you nest it() blocks in a request callback?
It seems that you could put "stuff" inside describe but outside it:
describe('1', function() {
var foo = 'bar';
console.log(foo);
it('1a', function(done) {
expect(true).toBe(true);
done()
});
it('1b', function(done) {
…

Adam Zerner
- 17,797
- 15
- 90
- 156