Questions tagged [js-test-driver]

js-test-driver is an open source JavaScript unit tests runner written in Java.

Js-test-driver, a project started at Google, is able to run from command line and reports results to the standard output. As a result, it is possible to fully automate JavaScript tests and run them on a continuous integration server.

The goal of JsTestDriver is to build a JavaScript test runner which:

  • easily integrates with continuous builds systems and
  • allows running tests on multiple browsers quickly to ease TDD style development.

Project page

122 questions
1
vote
1 answer

completes get not called when async is false using jquery and sinon's fakeXMLHttpRequest

I'm using js-test-driver and inside i use jasmine for testing and sinon for spies, fakeXMLHttpRequests and so on.. Let's assume we load the following files: load: - lib/jasmine.js - lib/JasmineAdapter.js - lib/sinon.js -…
iRaS
  • 1,958
  • 1
  • 16
  • 29
1
vote
1 answer

JsTestDriver assert when using requirejs in intellij

I was trying to write some javascript unit tests, using requirejs and jsTestDriver intellij plugin. When I run them in the IDE I have no error even when there are some. I only see them when opening my browser console. Did someone manage to make IDE…
P. Ekouaghe
  • 214
  • 5
  • 10
1
vote
0 answers

Issues performing integration tests on ember.js app using js-test-driver

I'm trying to integrate a small ember.js app into an existing web site. The code works just fine, but I'm having trouble getting my integration testing to work. messaging.js window.App = Ember.Application.create(); App.Store = DS.Store.extend({ …
1
vote
1 answer

WebStorm with jsTestDriver not finding jQuery

Saw this question but renaming to jQuery doesn't help. I'm trying to get some basic unit-testing in Webstorm to work. Even without the tests it's not finding things defined in other files. I have this config file: server:…
John-Philip
  • 617
  • 9
  • 20
1
vote
1 answer

Asynchronous execution of test cases in JS test driver

We are having CI build servers where different JS TestCases are to be executed parallely (asynchronously) on the same instance of JS test driver server. The test cases are independent of each other and should not interfere with each other. Is this…
Prajwal
  • 11
  • 1
1
vote
1 answer

Is it possible to run js-test-driver tests that uses requirejs modules?

I've been trying to use requirejs and js-test-driver along side, and I can't seen to get it working. I have a minimal configuration like this at the root : server: http://localhost:9876 load: -…
phtrivier
  • 13,047
  • 6
  • 48
  • 79
1
vote
1 answer

JsTestDriver - Missing artifact error

I'm trying to integrate JsTestDriver to Maven to test also my scripts before deploying. Actually I follow up the steps described at Google Code here. But unfortunately I'm not able to resolve dependency. Despite I added repository and…
talha06
  • 6,206
  • 21
  • 92
  • 147
1
vote
1 answer

JsTestDriver, name of the test function

Is there any restrictions on the name of the test function? When I write the following as testA() and testB(), both of them will be implemented. AjaxCreateTest = TestCase("AjaxCreateTest"); AjaxCreateTest.prototype.testA = function(){}; …
0
votes
2 answers

jQuery Ajax test does not work

I am trying to test a very simple jQuery plugin which simply calls $.ajax method and put its content into a element. For testing I am using JsTestDriver and Sinon for mocking. Plugin file looks: (function($) { $.fn.transfer = function() { …
lordofthejars
  • 713
  • 1
  • 6
  • 14
0
votes
2 answers

Programmatically fire onmousemove event in javascript

I'm writing a javascript library that does something on window.onmousemove event, now I'm writing the unit test for this code. How do I fire onmousemove for window object manually? For eg. I fire an event somethingHappened when window.onmousemove…
Shawn Mclean
  • 56,733
  • 95
  • 279
  • 406
0
votes
1 answer

JsTestDriver: expected [object] was {....}

I'm using JsTestDriver to test, and develop, something in Javascript. I'm having, periodically, this kind of AssertError: expected [object] but was {...} Some other times, it could be: expected [object] but was [object] And finally, it can also…
HexaGridBrain
  • 522
  • 7
  • 24
0
votes
1 answer

Testing jquery thats depend on version with Js-test.driver

im new to js-test-driver and have some questions how can i test this jquery event? ex verify that the event runs Search() if letter > 9 $("#search").live('keydown', function () { //start search after 10 letters if ($(this).val().length > 9) { …
Karl
  • 129
  • 1
  • 14
0
votes
1 answer

"Label not found" error in code coverage with jstestdriver

I have some javascript code with do while outer loop and switch inner loop, inner switch loop contains break outerloop. below is simplified version of code. While generating code coverage with jstestdriver coverage plugin, I am getting error "Label…
banjara
  • 3,800
  • 3
  • 38
  • 61
0
votes
0 answers

How to mock $xhr with Jack?

I have a function like: function Aoeu($xhr) { $xhr('GET', '/url', function(code, response) {}); }; How do I create with Jack a $xhr mock that's to be passed into Aoeu()? The following says that the mock is an object, not a function (which makes…
Noel Yap
  • 18,822
  • 21
  • 92
  • 144
0
votes
1 answer

Unexpected Results in Testing JavaScript Objects

I'm in the process of truly learning the nuances of working with JavaScript objects and ran into a snag. I have a set of "namespaced" objects to segment the DOM and Model to act on. Below is code: function Sandbox2(){ this.page = { FirstName:…
JamesEggers
  • 12,885
  • 14
  • 59
  • 86
1 2 3
8 9