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
0
votes
0 answers

Is it possible to test a .each(function()) statement?

I am attempting to test a javascript function. I am using jquery, sinon and running jsTestDriver.jstd in PhpStorm. I have two different scenarios where I need to test .each(function()). Scenario 1: My issue is that I need to test a function that…
Sharon
  • 138
  • 16
0
votes
1 answer

How to fix issue of code coverage not finding functions when run tests do?

When running my tests they all pass. When running code coverage 4 fail due to functions being 'not defined'. They are defined (as the tests clearly show when they pass). I cannot get the code coverage for the file that has the 4 functions being…
0
votes
1 answer

How to stop Code Coverage from crashing because of sinon even though tests without code coverage pass?

Issue: code coverage not working when sinon is a dependency. I currently have 3 test files. Running all the tests lead to 17 tests passing and 0 failing. 2 of these files require extra dependencies (lets call these files testDates.test.js and…
0
votes
2 answers

Using QUnit with JSTestDriver

I want to use JsTestDriver to drive my QUnit tests, but I'm confused about what to do with the #qunit-fixture markup. The standard QUnit test runner is an HTML page.
Patrick McElhaney
  • 57,901
  • 40
  • 134
  • 167
0
votes
1 answer

Test config file - newbee issues

I am trying to setup Jasmine in IntelliJ IDEA with the jasmine-jstd-adapter plugin for JSTestDriver. JSTD Plugin is installed jasmine was npm-installed globally (so it resides in %APPDATA%\npm\node_modules\jasmine) jasmine.js file from the npm…
Vankog
  • 557
  • 1
  • 9
  • 16
0
votes
1 answer

Saving multiple files in Eclipse using Ctrl+s causes "The file cannot be edited"

I'm regularly an IntelliJ IDEA user, but because jsTestDriver doesn't work with IDEA, I am forced to use eclipse. I am getting a very annoying error message every time I save my javascript files with CTRL-S shortcut. In IDEA, it just saves the…
egervari
  • 22,372
  • 32
  • 121
  • 175
0
votes
1 answer

Why would false not be defined in jasmine?

I'm using jasmine in conjunction to Js-test-driver using an adapter to connect them both. I've got the following test case: describe("Undefined false", function(){ beforeEach(function(){ var undefFalse = false; }); it("should…
Eldros
  • 551
  • 1
  • 9
  • 28
0
votes
3 answers

Getting lockups/hangs when using jsTestDriver with Intellij idea 9 (doesn't work at all on 10)

Is anyone using jsTestDriver with IntelliJ? What version are you using? Is it working well? I am using IntelliJ right off the website 9.0.4 with jsTestRunner 1.2.2 and I repeatedly get hangs when I run all tests. I decided to run the server in a…
egervari
  • 22,372
  • 32
  • 121
  • 175
0
votes
1 answer

No browsers available, yet actions requested?

I'm getting this error while trying to capture a browser using the JsTestDriver: java.lang.RuntimeException: No browsers available, yet actions [com.google.jstestdriver.RunTestsAction@5427ee05] requested. If running against a persistent server…
xarlymg89
  • 2,552
  • 2
  • 27
  • 41
0
votes
1 answer

How can I use jsTestDriver in jetBrains?

I am new to unit testing, please explain me how can I use unit testing specially jsTestDriver or karma in jetBrains software. I saw this link and install jsTestDriver Pluging to my phpStorm but I didn't understand how use it.
nayeri
  • 175
  • 1
  • 7
0
votes
2 answers

How do I get the total price from my carList?

I am creating a class called Car with a method called TotalPrice which will take an array of Cars and calculate the total for the list. I have implemented a client method totalPrice, which accepts a list (ArrayUnsortedList carList) of cars and…
pyuntae
  • 742
  • 3
  • 10
  • 25
0
votes
1 answer

JavaScript Unit Tests not working on SonarQube

I have below problems with SonarRunner. SonarQube along with Sonar runner unable to pull junit format xml reports Unit Tests or Test Coverage widget doesn't show up. It says No Data. I am following instructions described here I manually created…
rajcool111
  • 657
  • 4
  • 14
  • 36
0
votes
1 answer

Error with Ext.Msg in js-test-driver tests

In my js-test-driver tests, I'm having an error from simply calling Ext.Msg.alert('Error', 'An error occurred while trying load parameters for action with id ' + actionId); Error Message: Uncaught TypeError: Cannot read property 'insertBefore' of…
Ruan Mendes
  • 90,375
  • 31
  • 153
  • 217
0
votes
0 answers

JsTestDriver fails to capture Metro IE10 browser on windows8 machine

JsTestDriver fails to capture Metro IE10 browser on windows8 machine. The URL gets launched in the Metro IE10 browser but intermittently fails to capture the browser. Thus, no tests are being run. The desktop browser gets captured but the Metro…
Vikram Dave
  • 136
  • 1
  • 6
0
votes
1 answer

Can't assert DOM change with Asynchronous JS Test Driver

I have a function that gracefully loads an image inside a specified container. The below function WORKS, but the unit test doesn't (I know, shame, shame, code before test). The first 3 asserts work, the last 2 do not (tested by commenting one then…
1 2 3
8 9