Questions tagged [jasmine-node]

Integration of Jasmine Spec framework with Node.js

327 questions
4
votes
3 answers

How can I get jasmine-ts to execute my specs with a specific seed?

I am running unit tests using jasmine-ts version 0.3.0. The previous version worked fine, but the moment I upgraded, I'd get the output: No specs found I found a github issue (and this one) where someone commented: All arguments passed to…
pushkin
  • 9,575
  • 15
  • 51
  • 95
4
votes
1 answer

test works with jasmine-node, but not and with jasmine

I have a object that is subscribed to the uncaught error event and I am trying to test its behaviour. First I tried with jasmine-node, but now when I am trying to go with jasmine I found trouble. Could anyone help me. describe('Constructor tests',…
Yordan Kanchelov
  • 511
  • 9
  • 26
4
votes
1 answer

TypeError: jasmine.addMatchers is not a function

I am using "jasmine":"^2.5.2" and in node, I get error: TypeError: jasmine.addMatchers is not a function when using jasmine-node specfrom terminal running a simple example as below. What could cause this issue and how to fix it? function…
GibboK
  • 71,848
  • 143
  • 435
  • 658
4
votes
1 answer

How to stop stream-to-promise changing my original buffer

I'm using the stream-to-promise npm module to create the multipart/form-data payload in my jasmine test. My payload includes an image file as a buffer but when the payload is put through stream-to-promise it changes or corrupts my original image…
Ruth
  • 614
  • 2
  • 6
  • 20
4
votes
1 answer

Exercism exercise: jasmine-node . - command not found

I'm trying to run the first exercise in Exercism. I have followed the readme instructions and installed Homebrew, and then installed the CLI. Everything went fine. I then typed in the command line to download the first test - Hello World. Again,…
Paulos3000
  • 3,355
  • 10
  • 35
  • 68
4
votes
1 answer

Jasmine unable to find Spec files

In my MEAN project directory, I am trying to run Jasmine unit tests on my express controller. I was initially running node-jasmine however for added functionality I am changing to Jasmine 2.4. However I am running into problems with the location of…
Eats Indigo
  • 388
  • 3
  • 11
4
votes
2 answers

loop through it() in jasmine describe output spec not found

I learned that this way is the best way to loop through the it() in a describe(), but it failed on me with "spec not found", and seems stop right before the for loop function, I wonder where did I do wrong? Thanks! describe('this is my looping…
ey dee ey em
  • 7,991
  • 14
  • 65
  • 121
4
votes
1 answer

Jasmine-node tests executed twice

My jasmine-node tests are executed twice. I run those test from Grunt task and also from Jasmine command. Result is the same my tests are run twice. My package.json : { "name": "test", "version": "0.0.0", "dependencies": { "express":…
Lombric
  • 830
  • 2
  • 11
  • 23
4
votes
2 answers

Jasmine tests through bamboo?

I would like to integrate the jasmine tests with bamboo, but I'm not sure is it possible. The best what I found so far is https://bitbucket.org/atlassian/bamboo-nodejs-plugin which support just mocha tests. I would like to know is there any way to…
Grissom
  • 1,080
  • 8
  • 21
4
votes
1 answer

Unit-testing remote methods of a strongloop loopback.io model

I am trying to write unittests for a loopback model using jasmine. My model has the usual CRUD endpoints but I have defined a custom '/products/:id/upload' endpoint which expects a form with files. My model looks like 'use strict'; var loopback =…
4
votes
2 answers

Closing an express server after running jasmine specs

I am trying to set up jasmine testing of my express server. I am spinning up a new server with each spec and trying to shut it down after each spec completes. Unfortunately, the server doesn't seem to be shutting down... making running more than one…
jvanstry
  • 411
  • 4
  • 10
4
votes
1 answer

Jasmine-node - Creating a spy on a constructor called inside other function

I'm novice in jasmine and I need to write some unit tests for node.js app in this framework. I have some problems, one of them is this described below: var sampleFunction = function(){ var loader = new Loader(params); // rest of logic…
Grzegorz Pasnik
  • 164
  • 2
  • 7
4
votes
1 answer

jasmine-node - including helper

I am trying to test my Meteor application with jasmine-node. I've stubbed out some methods of Meteor framework in the helper (spec_helper.js): var Meteor = { startup: function (newStartupFunction) { Meteor.startup =…
alexs333
  • 12,143
  • 11
  • 51
  • 89
4
votes
1 answer

Travis CI times out on node jasmine tests, but passes locally

I've been working on a command line app in node that does some file system reads and express app stuff, and all my tests are passing locally, however Travis seems to be having an issue when building (timing out, which is a Jasmine Node thing).…
browserless
  • 2,090
  • 16
  • 16
4
votes
1 answer

Including Jasmine-node files in Karma's runner

Currently I have a set of node.js Javascript files along side a set of "regular" Javascript files that I will send down to a browser, using Angular as the client side framework. For unit testing I am using jasmine-node to test the server and am…
ahjmorton
  • 965
  • 1
  • 5
  • 18
1 2
3
21 22