Integration of Jasmine Spec framework with Node.js
Questions tagged [jasmine-node]
327 questions
0
votes
1 answer
Automate Rest Webservice testing using jasmine node
We are having an requirement to automate REST web services testing with jasmine node. Im pretty new to web service testing and node js as well.
What exactly we need to test in web services?
Could you please also guide in order to automate REST…

Tanmay
- 227
- 1
- 3
- 11
0
votes
1 answer
Jasmine & requirejs support for multi modules?
I am currently using Jasmine ("jasmine": "^2.4.1") with Node v6.1.0
I am both trying to provide and consume multiple modules in one file - however keep getting errors like object undefined or null etc.
I have played around with different syntax…

shenku
- 11,969
- 12
- 64
- 118
0
votes
0 answers
jasmine.createSpy is not a function
I wrote the below test. But when I run it I'm getting an error saying jasmine.createSpy is not a function.
import MyNode, {MqttOptions, IMessageReceivedCallBack, MyTopic, MyDataType,MyMessage} from '../../src/main/MyNode';
import {expect}…

AnOldSoul
- 4,017
- 12
- 57
- 118
0
votes
1 answer
No more request expected in jasmine
Could anyone please tell me what I'm doing wrong here when I am trying to run this test case I get an error :
Error: Unexpected request: GET "localhost:3000/home?extended=true"
No more request expected how can I handle multiple HTTP and…

Himanshu Teotia
- 2,126
- 1
- 27
- 38
0
votes
1 answer
jasmine-nodejs and using done() to complete asynch tests
I seem to be having a problem setting up my unit tests for my NodeJS app and then running them with Jasmine. The problem comes in using the done function of Jasmine. Whenver I include the done function in my test, I get an error that reads: Warning:…

MBielski
- 6,628
- 3
- 32
- 43
0
votes
1 answer
Can i use BeforeEach and afterEach functions in config file in protractor?
I wonder if can use beforeEach and afterEach functions in config file in protractor in order to avoid repeating common code for all scripts ?
Thanks.

Emna Ayadi
- 2,430
- 8
- 37
- 77
0
votes
1 answer
How can i execute more than one script from many files in testsuites using protractor?
I wonder if you can tell me how can i execute more than one script from many files in testsuites using protractor without having the problem of jasmine time out ?
Thanks.

Emna Ayadi
- 2,430
- 8
- 37
- 77
0
votes
1 answer
How to spy on a method inside a dependent module using jasmine-node
I am trying to write jasmine tests for a module-(say moduleA) which 'requires' another module-(moduleB).
======> moduleB.js
function moduleBFunction(){
console.log('function inside moduleB is called');
}
======> moduleA.js
var moduleB =…

Vijay Kasina
- 144
- 1
- 8
0
votes
0 answers
node-jasmine expect assertions not 'visible' within a function call
I am new to using Jasmine and BDD testing and I am trying to test if a simple page exists.
I have the following code:
describe("when server is running",function () {
it("should serve an index page", function(){
…

James Bubb
- 3,023
- 1
- 12
- 12
0
votes
1 answer
How to stub val function of jquery using jasmine?
My code has a line:
$("#divID select").val(0)
I've to write a unit test using Jasmine for this. I've set up the dom elements. Can I stub val and check whether it's called on this particular selector and called with 0 as argument?

user2597100
- 97
- 1
- 10
0
votes
1 answer
jasmine-node outputs silently when unhandled exceptions happen in tests
I'm having a problem where jasmine-node silently fails if unhandled exceptions happen in a test.
If I run a single file, everything is OK and I get the expected jasmine output:
./node_modules/jasmine-node/bin/jasmine-node…

shoegazerpt
- 845
- 8
- 18
0
votes
2 answers
Node function returning 'undefined' before request completes with desired return value
I know that Node is all about callbacks. I've tried to keep that in mind when creating a Jasmine test as I learn more about Jasmine and Node.
I wrote a very basic test using jasmine-node that is supposed to GET an HTML page, use 'cheerio' to load…

Ronan M
- 65
- 4
0
votes
1 answer
How to check that two propery in an object have the same value
I use the test framework Frisby and I want to check that two propery have the same value as in the exampel below where count must be equal to total_count.
I have been looking around but haven't any way to check that two property have
the same…

Tony
- 21
- 1
- 4
0
votes
2 answers
JavaScript code does not pass Jasmine toThrow test
I am learning JavaScript and Jasmine-Node I have successfully passed the first 11 matchers. But I can't seem to get past this toThrow matcher and I have looked up everything I can think of to get past it. I am stuck. I would really appreciate some…

pks_jw
- 13
- 4
0
votes
2 answers
No output from jasmine-node on FilesizeWatcherSpec - Newbie Alert
I'm new to Node.js and jasmine, and my JavaScript experience is old and rusty, so I'm a newbie there too. I finished Manuel Kiessling's book, The Node Beginner Book, and I am working my way through his second book, The Node Craftsman Book. I'm…

Patricia
- 5,019
- 14
- 72
- 152