Questions tagged [jasmine-node]

Integration of Jasmine Spec framework with Node.js

327 questions
0
votes
0 answers

Is there a way to install karma without Visual Studio in Windows 8?

I am trying to install karma on Windows 8 using node but I am getting: MSBUILD : error MSB3411: Could not load the Visual C++ component "VCBuild.exe". ... And I am learning this is becuase Visual Studio is expected?? error MSB3411: Could not l oad…
R Claven
  • 1,160
  • 2
  • 13
  • 27
0
votes
1 answer

How to test accordion using Protractor?

Sometimes my user reports that accordion in my application is not working . So i want test whether the accordion is working or not working. I am using Angular js in frontend. Currently i am testing using protractor e2e framework. My accordion markup…
prashanth-g
  • 1,183
  • 2
  • 13
  • 28
0
votes
0 answers

jasmine unit testing failing

Here is the function I am testing: Utilities.js exports.calculateAgeTimeStamp = function(timestamp) { //get year var userYear = new Date(timestamp * 1000); min = userYear.getFullYear(); //get current year …
user3754111
  • 859
  • 1
  • 10
  • 20
0
votes
1 answer

jasmine-node error TypeError: undefined is not a function

i am getting this error from last two days where as the code is same and installation procedure is also same , is this because of any new update in jasmine-node /var/www/jasmine-node# jasmine-node --verbose --junitreport --noColor spec …
Terence
  • 729
  • 1
  • 7
  • 17
0
votes
1 answer

jasmine-node pass ressults

i´m trying to check several requirements on a html body, received by the node-module request with jasmine-node. The normal case would be to write something like this: describe("check website body", function() { it("should contain 1st…
solick
  • 2,325
  • 3
  • 17
  • 29
0
votes
2 answers

Jasmine-node and sails.js (0.10.0-rc8)

When I try to run something as simple as this, I get an error: 'static() root path required'. If only one 'it' is run, it will pass. Anyone knows what's the catch? var Sails = require('sails'); describe("Crud tests:", function() { var app; …
gazdac
  • 189
  • 2
  • 11
0
votes
1 answer

Jasmine-reporters error in angularjs end to end test

I'm trying to integrate Jasmine reports with Angular end to end test. But while running the test I'm getting the following error(I even tried the same in windows based environement and got the same result), in on prepare method Error: Cannot find…
buffe
  • 41
  • 1
  • 6
0
votes
1 answer

Jasmine Custom Matchers Do Not Work

I made a couple matchers, one designed to always pass, and the other designed to always fail. Here is my spec file: /* my-spec.js */ beforeEach(function() { var matchers = { toPass: function() { return { …
Joncom
  • 1,985
  • 1
  • 18
  • 29
0
votes
4 answers

how to access the javascript variable from controller

I need to know to access the variable ''x" from controller Javascript function myCtrl() { var x =1; } Jasmine describe("myCtrlsettings", function() { var scope ; var rootScope; beforeEach(inject(function($rootScope,…
AlexAnand
  • 169
  • 4
  • 18
0
votes
1 answer

Cannot find module Q in build

I run jasmine tests on Travis-CI for long, but on the latest commit I get the error Cannot find module Q whereas the dependency is met in package.json. if I run them locally, the tests pass well. Message: Error: Cannot find module 'Q' Stacktrace: …
Vinz243
  • 9,654
  • 10
  • 42
  • 86
0
votes
1 answer

how to mock/stub a node.js module

I'm working on some code to run on RaspberryPi, and I'm using the Wiring-Pi node module. I have two problems 1) Wiring-Pi won't build on x86 platforms 2) Node-jasmine won't build on RaspberryPi So, after playing around with a bunch of different…
pedalpete
  • 21,076
  • 45
  • 128
  • 239
0
votes
1 answer

How to install jasmine-node on Ubuntu 12.04?

I have successfully installed node.js(v0.6.12) and npm(v1.1.4). However when I try to install jasmine-node with the console command from the website(https://github.com/mhevery/jasmine-node); npm install jasmine-node -g I got the following error…
yns
  • 440
  • 2
  • 8
  • 28
0
votes
0 answers

why is jasmine not running this test?

I'm trying to run a test that waits for a promise to be returned, but jasmine is exiting before completing the test, and I can't seem to figure out why. My tests is describe("npm packages",function(){ it("should get npm packages", function(){ …
pedalpete
  • 21,076
  • 45
  • 128
  • 239
0
votes
1 answer

jasmine 2.0 async assignin variables

I want to set 2 variables to my test case which an async function returns. In a prior attempt I was using runs() and waitsFor() but I want to use jasmine 2.0's done() functionality. I tried something like this: describe("Test", function() { …
TorusTorus
  • 47
  • 8
0
votes
2 answers

Replacing karma with jasmine-node for my AngularJS tests?

Jasmine AngularJS test (passes in karma start configs/karma.conf.js) describe('IndexController', function () { beforeEach(module('myApp')); var ctrl, scope; beforeEach(inject(function ($controller, $rootScope) { scope =…
A T
  • 13,008
  • 21
  • 97
  • 158
1 2 3
21
22