Integration of Jasmine Spec framework with Node.js
Questions tagged [jasmine-node]
327 questions
1
vote
1 answer
ignored children tests in Frisby JS with jasmine-node
I use Frisy with jasmine-node to test an Meteor API.
I want to test the remove of a discussion in a chat App. For this, I need to create a new discussion in chat and add a message in the discussion.
I noticed that my test fail if I put it after the…

Samuel Dauzon
- 10,744
- 13
- 61
- 94
1
vote
2 answers
How to connect a function declaration between Node and Jasmine files?
In my pigLatin Jasmine file I am trying to get the following code to work:
var pigLatin = require("./pigLatin.js");
describe('#translate', function() {
it('translates a word beginning with a vowel', function() {
s = translate("apple");
…

mcrav95
- 69
- 6
1
vote
0 answers
How to generate test overview in Frisby
As mentioned in frisby official document (http://frisbyjs.com/) , I am using --junitreport something like following
jasmine-node ./demo/validation_spec.js/ --junitreport --output
C:\Users\Administrator\Documents\script/Reports
which is…

user3543707
- 47
- 1
- 5
1
vote
0 answers
pooling a set of userIDs using beforeEach and afterEach
I have a pool of 5 userIds.
Using concurrent execution I want to use 3 unique userIds of the above at at the same time concurrently as using the same userId in more than one test will interfere and cause failures.
A) While I have the code to manage…

win
- 119
- 2
- 14
1
vote
2 answers
Node-Jasmine not failing when expected
I'm trying to setup a node-jasmine test for the first time. Currently I'm just trying to setup a simple test to see that getting the index returns status 200.
It seemed to be working but I noticed no matter what I change the status number to it…

Philip Kirkbride
- 21,381
- 38
- 125
- 225
1
vote
1 answer
Jasmine-node Body is undefined
I am new to jasmine and attempting to run a basic test however I keep getting an error.
My testing is as follows
var request = require('request');
var base_url = 'http://localhost:8080'
var getdata = require('../modules/getdata.js')
var index =…

Jack Tidbury
- 183
- 1
- 1
- 12
1
vote
1 answer
How to export and import two different function objects in JavaScript?
I use Jasmine-Node to test Javascript code.
How can one export two different function objects like Confusions1 and Confusions2 so that both are available in the Jasmine-Node test file?
My attempt looks like this:
// confusions.js
var Confusions1 =…

StandardNerd
- 4,093
- 9
- 46
- 77
1
vote
1 answer
jasmine-node doesnt wait for body to be done
I am currently able to pass a test with
expect(response.statusCode).toEqual(200)
but doing this line right underneath
expect(body.name).toEqual('erilcompa')
gives me a undefined.
console.log(body) however gives the body
All of it looks like…

Erik
- 62
- 8
1
vote
0 answers
jasmine: how to display success message of a matcher
For example I have the following spec:
it('All set should pass', function(){
expect(string1).myMatcherCheckIfEquil(string2);
expect(string2).myMatcherCheckIfContain(string3);
expect(num1).myMatcherCheckIfTrue(true);
})
Suppose all…

Nadin
- 61
- 8
1
vote
1 answer
Jasmine is not defined when deploying Frisby test to AWS Lambda
I'm attempting to deploy a Frisby.js test to AWS Lambda and continually get a reference error. I've included the output log from Lambda, the code in question, and the package.json dependencies. Has anybody encountered an issue like this before when…

JacobB
- 324
- 1
- 3
- 10
1
vote
0 answers
Testing an angular (authenticated)service using jasmine
I am new in jasmine and trying to write test case.. I am stuck need a little push/help.
I am using JASEMINE in my MEAN app.
Here is code!!
Service
angular.module('rugCoPro')
.service('AuthenticationService', ['$http', 'ObjectUtils', 'Session',…

jatinder bhola
- 385
- 1
- 7
- 23
1
vote
0 answers
custom matchers how to load in jasmine-node?
I am using jasmine-node and want to reuse some custom matchers I have been using with karma. I cannot find how to load my custom matchers...
Using karma and jasmine 2.4 I can load them this way:
beforeEach(function () {
…

Thibs
- 8,058
- 13
- 54
- 85
1
vote
2 answers
How to write a leap year algorithm in Javascript with TDD?
I'm trying to write a leap year algorithm with a TDD suite.
This is my first real attempt in working with TDD.
This is the code from the spec file.
var Year = require('./leap');
describe('Leap year', function() {
it('is not very common',…

Timoor Kurdi
- 65
- 1
- 6
1
vote
0 answers
How can we use dependency functionality that is present in jasmine
In jasmine suite , if we have 10 specs , how can we arrange dependeny specs such that if any dependency specs are failed the jasmine should not execute other specs which has to be executed.
In testNG library which is used for java unit testing where…

Vivek
- 151
- 2
- 14
1
vote
1 answer
jasmine-node _spec execution order
I've started integrating jasmine-node for testing some REST API, but I'm having hard time trying to find a way to specify the _spec files execution order.
Since all the API requires a Bearer authentication header, I have to make sure the test…

Andrea Cammarata
- 836
- 5
- 7