Questions tagged [chutzpah]

Chutzpah is an open source JavaScript test runner which helps you integrate JavaScript unit testing into your website. It enables you to run JavaScript unit tests from the command line and from inside of Visual Studio. It also supports running in the TeamCity continuous integration server. Chutzpah supports the QUnit, Jasmine and Mocha testing frameworks. Chutzpah uses the PhantomJS headless browser to run your tests.

Chutzpah is an open source JavaScript test runner which helps you integrate JavaScript unit testing into your website. It enables you to run JavaScript unit tests from the command line and from inside of Visual Studio. It also supports running in the TeamCity continuous integration server.

Chutzpah supports the QUnit, Jasmine and Mocha testing frameworks. Chutzpah uses the PhantomJS headless browser to run your tests.

Resources

262 questions
0
votes
1 answer

Angular/Jasmine/Chutzpah: Unit Testing DOM Element (Sweetalert)

I'm trying to write a Unit Test that checks if a modal window (sweetalert) is present in the headless browser. To test if it's present, I can use this jQuery accessor $('*').hasClass('sweet-overlay') From testing sweetalert in Chrome, I do not…
user714157
  • 399
  • 2
  • 4
  • 18
0
votes
1 answer

Can't get TypeScript reference to work with Chutzpah

I have the following files in my project folder: chai.d.ts chai.js mocha.d.ts mocha.js appTest.ts appTest.js chutzpah.json The chai and mocha files have been downloaded using bower and tsd Here is what is in the other files: appTest.ts: ///…
Jack Allan
  • 14,554
  • 11
  • 45
  • 57
0
votes
1 answer

Loading an Angular module from Jasmine unit test

I'm trying to setup my Angular unit test in Visual Studio with Chutpah and Jasmine. I get this error, and I'm not sure why: This is the code to test in my timelineservice.js file (in my angular project, simplified for my first-test…
Michel
  • 23,085
  • 46
  • 152
  • 242
0
votes
1 answer

TypeScript+Jasmine when tested class is within module definition

I'm unable to figure out how to write a Jasmine test in TypeScript when the class to be tested is inside a module definition. This setup works fine: Calculator.ts: export class Calculator { add(x: number, y: number): number { return x +…
Dan Byström
  • 9,067
  • 5
  • 38
  • 68
0
votes
2 answers

angular directive unit testing with jasmine with external template

I am trying to unit test angular directive which has an external template. Sample code is given below. var vsLogin = angular.module('vs-login', []); vsLogin.directive('vsLogin', function (vsLoginService, dataService, applicationService, $state,…
arupc
  • 356
  • 1
  • 3
  • 12
0
votes
1 answer

Angular: module behavior, I don't understant javascript code if ("")

I am using angularjs 1.4.3. And I have a curiosity because I don't understand a piece of code of the code generated by Jasmine Spec Runner. When we generate it, Jasmine (via ChutzPath) create this code: (function () { var amdTestPaths =…
Dave
  • 7,028
  • 11
  • 35
  • 58
0
votes
1 answer

How do I run Jasmine tests in Microsoft Edge?

I am trying to run Jasmine js tests in Microsoft Edge, but I get the following error: Object doesn't support property or method 'initializeJasmine' I am launching my tests from visual studio with the Chutzpah plugin. From what I can see in the edge…
Samuel Poirier
  • 1,240
  • 2
  • 15
  • 30
0
votes
1 answer

What Build Step should be used for running QUnit tests in TeamCity?

I've got a TeamCity build configuration with two steps currently: MSBuild Execute powershell sciprt I want to add another one: Run QUnit tests Inside Visual Studio I use Chutzpah to run my QUnit tests. It seems that there is no "Runner type"…
Jeroen
  • 60,696
  • 40
  • 206
  • 339
0
votes
1 answer

Testing TypeScript and AngularJS in Visual Studio with Jasmine and Chutzpah - can't find variable: angular

I'm trying to test my TypeScript and AngularJS code with Jasmine in Visual Studio Chutzpah. Test is running correctly in karma, but I realy like Chutzpah's UI. My controllerSpecs.ts: /// ///…
0
votes
2 answers

How can I mock dependencies of a factory in AngularJs?

I'm trying ti do a unit test for my AngularJs app, using Chutzpah in VS2013. Let's say I have this factory: myAppModule.factory('MyService',function(){ var fact = {}; fact.myFunction = function(){ return "Hello"; }; }); I wrote the unit…
Dabbas
  • 3,112
  • 7
  • 42
  • 75
0
votes
1 answer

Change location of chutzpah.log during tfs build

I'm trying to diagnose some random failures of qunit tests during our tfs (2013) builds. By turning on tracing, I can get chutzpah (4.0.3) to generate a log file in %TEMP%. However, our build agents could have multiple instances executing and I'm…
arch-imp
  • 217
  • 3
  • 12
0
votes
1 answer

Chutzpah adding multiple team build file specifications

Is there a way with Chutzpah to specify multiple test specification file sources when running the JS unit tests via Team Build? I understand that I can add multiple test sources in the build definition. The major downside to this is it generates…
0
votes
1 answer

Typescript project with Unit tests, problems running tests with Chutzpah

I have a project in Visual Studio that is using typescript and requirejs, and that is running QUnit tests with the help of Chutzpah. Folderstructure in my project looks basically like this: - chutzpah.json - app/ - index.html - js/ -…
Malyngo
  • 863
  • 7
  • 18
0
votes
1 answer

How to set viewport size in PhantomJS from Chutzpah

How I can set viewport size in PhantomJS? I tried to set it using window.callPhantom: window.callPhantom('page.viewportSize = { width: 480, height: 800 };') as suggested here: https://github.com/mmanela/chutzpah/issues/355, but this doesn't seem to…
El Kopyto
  • 1,157
  • 3
  • 18
  • 33
0
votes
1 answer

Getting accurate code coverage statistics with combined JavaScript file + Chutzpah/Blanket.js

I have a TypeScript project that uses Visual Studio's "Combine JavaScript output into file" option to create a single .js file containing all my application's code (excluding libraries). I'm using the Chutzpah Test Adapter to integrate and run…
Nathan Friend
  • 12,155
  • 10
  • 75
  • 125