problem about js-test-driver-Collection of common programming errors


  • Chorn
    javascript code-coverage js-test-driver
    Trying to add tests support into my project. Attached JsTestDriver with coverage plugin. Dummy tests are working correctly, but when i load up all my source files I’m getting application crashed with the following:[java] **line 109:12 no viable alternative at input ‘formFound’** [java] Exception in thread “main” com.google.jstestdriver.coverage.CodeInstrumentor$InstrumentationException: error instrumenting /path/discover.js [java] at com.google.jstestdriver.coverage.CodeInstrumentor.instrument(

  • Nick
    linux firefox crash js-test-driver
    I’m just starting out with JsTestDriver and I’ve created very simple demo code to see if I have configured my environment correctly. However about 40-50% of the time I’m getting the following error when Firefox is launched (via JsTestDriver) “Firefox Closed Unexpectedly While Starting”.This error does not occur if I use Chrome.My environment consists of:VirtualBox 4.1.18 running Ubuntu 10.04.4 LTS 32bit Firefox 13.0.1 JsTestDriver-1.3.4.b openjdk-6-jre-headlessI’m executing:java -jar /home/devel

  • jm2
    coffeescript requirejs js-test-driver
    I am trying to test a simple Backbone Model loaded via RequireJS: define [“backbone”], (Backbone)->class Todo extends Backbone.Model defaults:title: ”priority: 0done: falsevalidate: (attrs) -> errs = {}hasErrors = falseif (attrs.title is “”)hasErrors = trueerrs.title = “Please specify a todo”if hasErrorsreturn errstoggleDone: ->@save(“done”, !@get(“done”))return TodoMy tests look like: requirejs.config baseUrl: “js/”paths: jquery: “https://ajax.googleapis.com/ajax/libs/jquery/1/jquery.

  • GotNoSugarBaby
    unit-testing gcov js-test-driver lcov jscoverage
    SummaryI’ve recently switched from using Google’s JsTestDriver to Testem but miss LCOV HTML Code Coverage Reports, is there a way to convert JSCover output into LCOV format, so I can use genhtml to create reports like these.DetailI’m working from a JSCoverage example using Testem, Jasmine and PhantomJS which generates the 2 following coverage output formats;coverage.xml<report><stats><packages value=”1″/><classes value=”1″/><methods value=”1″/><srcfiles value=”1″

  • Noel Yap
    js-test-driver angular
    I have the following code:function TestStats($xhr) {$xhr(‘GET’,’/test-dashboard/get-projects.json’,angular.bind(this, function(code, response) {this.projects = response.projects;this.projects.splice(0, 0, undefined);}));this.$watch(‘project’, angular.bind(this, function() {this.testClassStats = undefined;if (this.project) {$xhr(‘GET’,’/test-dashboard/get-test-stats.json?project=’ + this.project,angular.bind(this, function(code, response) {this.testClassStats = response.testClassStats;}));}})); }

  • user1802967
    javascript backbone.js jasmine js-test-driver
    I am writing tests in Jasmine for a Backbone application and I want to know what proportion of the code my tests cover. For this goal I want to use jsTestDriver. But I have a problem: I created a config file and added all resources there, but when I start test Backbone methods don’t define. This is my config file:server: http://localhost:9876load:- lib/jasmine-1.3.1/jasmine.js- lib/jasmine-jquery.js- lib/JasmineAdapter.js- lib/sinon-1.5.2.js- cordova-2.2.0.js- libs/jquery-1.8.2.min.js- libs/unde

  • Blacksonic
    javascript js-test-driver
    After upgrading to version 1.3.5 from 1.3.4 referencing an undefined variable causes the tests to fail. Any suggestions how to disable this behavior? I think its related to js strict mode, that it enables this by default, but cant find a way to disable itPart of the JsTestDriver.conf file:load:- program.js- dialog.jsprogram.js :Program = {};dialog.js :Program.Dialog = {};The error message: ReferenceError: Program is not defined

  • Eldros
    javascript js-test-driver
    I’m using jasmine in conjunction to Js-test-driver using an adapter to connect the both.I’ve got this following test case:describe(“Undefined false”, function(){beforeEach(function(){var undefFalse = false;});it(“should return a defined value”, function(){expect(this.undefFalse).toBeDefined();});it(“should return false”, function(){expect(this.undefFalse).toBeFalsy();}); });Whereas the second test succeeds as expected, the first fails with the following error:Undefined false test.test that it sh

  • Ashkan Aryan
    javascript jquery unit-testing qunit js-test-driver
    Background: I’m coming from Java background so not too familiar with Javascript.We are planning to introduce JavaScript unit testing to both our existing (legacy) code and future work. We are a java shop (Spring, Weblogic etc) mainly. We are looking at options that give us good integration with IDE (IntelliJ idea) and sonar, as well as being able to run them as part of continuous integration.JsTestDriver seems to tick all the boxes.Question:A lot of our existing javascript code is a)embeded with

  • Adam Lynch
    google-chrome windows-services cygwin jenkins js-test-driver
    I’m testing JsTestDriver with Jenkins locally on Windows XP with Cygwin (at the front of my system Path). Jenkins calls a .sh script which contains the following:java -jar “D:\Tools\jstestdriverexample\JsTestDriver-1.3.4.b.jar” –port 9876 –server http://localhost:9876 –tests all –reset –config jsTestDriver-Jasmine.conf –testOutput results-jasmine –browser “C:/Program Files/Internet Explorer/iexplore.exe”,”C:/Program Files/Mozilla Firefox/firefox.exe”,”C:\Documents and Settings\alynch\Loca