Search Results

Search found 6 results on 1 pages for 'jsunit'.

Page 1/1 | 1 

  • Must JsUnit Cases Reside Under the Same Directory as JsUnit?

    - by chernevik
    I have installed JsUnit and a test case as follows: /home/chernevik/Programming/JavaScript/jsunit /home/chernevik/Programming/JavaScript/jsunit/testRunner.html /home/chernevik/Programming/JavaScript/jsunit/myTests/lineTestAbs.html /home/chernevik/Programming/JavaScript/lineTestAbs.html When I open the test runner in a browser as a file, and test lineTestAbs.html from the jsunit/myTests directory, it passes. When I test the same file from the JavaScript directory, the test runner times out, asking if the file exists or is a test page. Questions: Am I doing something wrong here, or is this the expected behavior? Is it possible to put test cases in a different directory structure, and if so what is the proper path reference to to JsUnitCore.js? Would JsUnit behave differently if the files were retrieved from an HTTP server? <html> <head> <title>Test Page line(m, x, b)</title> <script language="JavaScript" src="/home/chernevik/Programming/JavaScript/jsunit/app/jsUnitCore.js"></script> <script language="JavaScript"> function line(m, x, b) { return m*x + b; } function testCalculationIsValid() { assertEquals("zero intercept", 10, line(5, 2, 0)); assertEquals("zero slope", 5, line(0, 2, 5)); assertEquals("at x = 10", 25, line(2, 10, 5)); } </script> </head> <body> This pages tests line(m, x, b). </body> </html>

    Read the article

  • JSunit usability

    - by stevebot
    Is JSunit really a direct port of Junit to Javascript? So I have heard, but I am wondering why my company is not using it. My company has lots of smart minds, so If we are not using it I wonder if there are any major issues with Jsunit as a javascript test harness. Input would be much appreciated. thanks!

    Read the article

  • Javascript Buildmanagement - "Must have" tools?

    - by lajuette
    Are there any must have tools for Java Script (RIA) development like maven, jUnit, Emma, link4j etc. for Javascript? What is the best way to set up a continous integration system for a bigger application or framework? How do projects like jQuery test their code? How to manage dependencies and different project configurations? tools i know so far: javascript-maven-tools (is maven the right choice?) jslint yuicompressor sprockets (found it 5 mins ago) jsunit selenium

    Read the article

  • Resolve sibling folder in JavaScript Function

    - by Jamen Chu
    Hi, I am trying to pass into an JavaScript function two paths for an XML and XSLT. It would appear that in the sample HTML below that the use of "../xsl/filename" does not work for me in the xslt() function. If I specify the path as being "./filename" though this does work. Does anyone know how I can work around this or find some way that I can specify a sibling folder without an absolute path reference? I would prefer not to have to change my file paths as my development environment is set up with the xslt's, sample data and source code structured in a particular way. Thanks in advance Jamen <html> <head> <title></title> <script type="text/javascript" src="../lib/jsunit/app/jsUnitCore.js"></script> <script type="text/javascript" src="../lib/jquery-1.2.3.js"></script> <script type="text/javascript" src="../lib/jquery.xslt.js"></script> </head> <body> <div id="bla"></div> <script type="text/javascript"> $('#bla').xslt("../sampledata/response1.xml", "../xslt/resultFormatter.xsl"); //function testjQuery() { // $('#bla').xslt("../sampledata/response1.xml", "../xslt/resultFormatter.xsl"); //} </script> </body> </html>

    Read the article

  • Execute JavaScript from within a C# assembly

    - by ScottKoon
    I'd like to execute JavaScript code from within a C# assembly and have the results of the JavaScript code returned to the calling C# code. It's easier to define things that I'm not trying to do: I'm not trying to call a JavaScript function on a web page from my code behind. I'm not trying to load a WebBrowser control. I don't want to have the JavaScript perform an AJAX call to a server. What I want to do is write unit tests in JavaScript and have then unit tests output JSON, even plain text would be fine. Then I want to have a generic C# class/executible that can load the file containing the JS, run the JS unit tests, scrap/load the results, and return a pass/fail with details during a post-build task. I think it's possible using the old ActiveX ScriptControl, but it seems like there ought to be a .NET way to do this without using SilverLight, the DLR, or anything else that hasn't shipped yet. Anyone have any ideas? update: From Brad Abrams blog namespace Microsoft.JScript.Vsa { [Obsolete("There is no replacement for this feature. Please see the ICodeCompiler documentation for additional help. http://go.microsoft.com/fwlink/?linkid=14202")] Clarification: We have unit tests for our JavaScript functions that are written in JavaScript using the JSUnit framework. Right now during our build process, we have to manually load a web page and click a button to ensure that all of the JavaScript unit tests pass. I'd like to be able to execute the tests during the post-build process when our automated C# unit tests are run and report the success/failure alongside of out C# unit tests and use them as an indicator as to whether or not the build is broken.

    Read the article

1