Questions tagged [grunt-contrib-jasmine]

A grunt plugin to run Jasmine specs headlessly through PhantomJS

After installation of this plugin using npm install grunt-contrib-jasmine --save-dev you can run a Jasmine task using grunt jasmine.

for more details go to github

46 questions
0
votes
1 answer

How to communicate port from grunt connect to grunt jasmine task

I am using grunt connect ("grunt-contrib-connect": "0.11.2") in conjunction with grunt jasmine ("grunt-contrib-jasmine": "^1.1.0"). The connect config was previously hardcoding the port number and the jasmine config was also configured to use the…
DaveJohnston
  • 10,031
  • 10
  • 54
  • 83
0
votes
0 answers

utils is not defined and Expected undefined to be function

"I'm trying to cover my default function through to jasmine. But facing issue with dependency files where jasmine is unable to took reference of those dependency. Getting 1 error utils is not defined and 2 error Expected undefined to be…
0
votes
2 answers

How can I configure the jasmine's random on gruntfile?

How can I configure the random option using grunt-contrib-jasmine? I can do it directly with jasmine's command line, but running jasmine's task by grunt-cli I didn't find the random option. Then the output of command line always shows the specs'…
0
votes
0 answers

Unknown Provider error while unit testing in jasmine

I have a module as below in a js file app.js angular.module( 'app', [ 'ui.bootstrap', 'routes', 'module2', 'ngAnimate', 'ngSanitize' ] ); If i am to write a unit test case then how should i load the modules in my unit test case?? Is it this…
user2918673
  • 141
  • 1
  • 9
0
votes
1 answer

Why does Jasmine complain about 'Attempted to assign to readonly property' when I set selectedIndex?

When I run this Jasmine spec through grunt-contrib-jasmine, I get the error TypeError: Attempted to assign to readonly property. pointing to the line where I set the selectedIndex attribute: it('does something', function () { …
RSeidelsohn
  • 1,149
  • 18
  • 33
0
votes
2 answers

PhantomJS exited unexpectedly with exit code 3221225477

i'm using Phantomjs combined with grunt and jasmine to run unit tests for AngularJs application. I'm experiencing strange behavior when the Unit tests become too many. In my case 754/755 unit tests. The unit tests run fail with the following message…
0
votes
1 answer

Error running jasmine-jquery in grunt-contrib-jasmine task

I'm attempting to use jasmine-jquery in my unit tests to test BackboneJS Views but i'm getting the following error when I try to run the tests: Running "jasmine:src" (jasmine) task Testing jasmine specs via PhantomJS TypeError: 'undefined' is not…
AJ72
  • 168
  • 1
  • 12
0
votes
1 answer

.grunt folder created in the project after run grunt jasmine

I just noticed today, when i run: grunt jasmine That create a folder .grunt in my main project folder with :grunt-contrib-jasmine , that is normal? i dont't think so. I am Using Phantomjs for test by terminal I have already that folder in my…
raduken
  • 2,091
  • 16
  • 67
  • 105
0
votes
0 answers

grunt karma | Jasmine.js tasks issue

After running grunt karma, getting below error, the only change which I made, was upgrading the node packages. "grunt-contrib-jasmine": "~0.8.2", "karma": "~0.12.36", "karma-chrome-launcher": "~0.1.12", "karma-firefox-launcher":…
0
votes
1 answer

Testing an Angular directive with isolate scope data

I have an AngularJS directive that reads an input data from it's attributes, like this: My directive: return { scope: { inputData: '=' } } ... Now, I usually define a nested array…
alexandernst
  • 14,352
  • 22
  • 97
  • 197
0
votes
1 answer

grunt-contrib-jasmine angularjs module-not-available error

I have a script that looks like this: angular.module('Game').constant('WHITE_PIECE', '\u26C0') ... more lines ... .constant('WHITE_KING', '\u26C1') (end of file) When I run grunt jasmine, I get the…
AlexMA
  • 9,842
  • 7
  • 42
  • 64
0
votes
1 answer

Reduce size of grunt with packages on linux. File paths too long for Jenkins

I just recently downloaded grunt with 2 packages on my linux machine. Grunt-contrib-jasmine for command line jasmine unit testing. Guide I followed: https://github.com/gruntjs/grunt-contrib-jasmine Grunt-template-jasmine-Istanbul for code…
0
votes
1 answer

PhantomJS catching error in Jasmine

Issue I have a very large testing suite built for a large scale application. The suite includes upwards of twenty different JS spec files that run through hundreds of tests for said application. It has gotten to a point where Jasmine (run via Grunt…
0
votes
1 answer

PhantomJS failed to load your page. Use --force to continue

I am trying to run test with grunt-contrib-jasmine trough command line "grunt jasmine", but its fails giving the warning : "PhantomJS failed to load your page. Use --force to continue."... base.spec.js: describe('Namespace',function(){ …
0
votes
1 answer

Discrepancies between Jasmine tests: browser vs. PhamtomJS

I'm running BDD tests using the grunt-contrib-jasmine plugin. When I generate the _SpecRunner.html and run the tests through Chrome everything is fine. When I run the tests via PhantomJS I receive error messages which indicate that jQuery is not…
johnsorrentino
  • 2,731
  • 1
  • 16
  • 21