Looking for a Javascript unit testing framework [closed] - javascript

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 8 years ago.
Improve this question
What do you recommend as the best and most documented Unit Test Framework for Javascript?

Jasmine is a BDD testing framework for javascript that works client-side or server-side. It works well in Rails, Node, Maven, etc. There's also a lot of plugins for things like jQuery.

Jquery team is using its Qunit for client side testing . It has a potential.

Check out this post. JSUnit is probably very effective, but I've found that Firebug now has an extension called FireUnit.

JSUnit is fairly useful, though it's been discontinued.

There are a whole bunch of modules found on the npm if you search for "unit test".
There is also the CommonJS testing specification.
I've written implementations of them which are on github. But I wouldn't call them production ready. There reasonably stable.

Very young, but still nicely functioning framework - bob.js.

Related

How to mock DOM object in Js? [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 7 years ago.
Improve this question
I would like to add some unit tests to test UI of some javascript. However I don't want to use HTML page, I would like to use node.js.
Is there any js library which I can use to mock HTML DOM, like document?
Yes, You can use jsdom for this. It is what facebook's jest framework uses behind the scenes to run tests on components that use DOM via node.
You could consider using a headless browser. Depending on your technology stack there are multiple options. When using node.js A popular one is phantom.js. There're different test runners for different test frameworks, here's an overview of them.
mocha.js is a popular testing framework which has a phantom.js test runner.
If you're using browserify there's also mochify which works really nice.
There's also jsdom but one caveat with that one is that it only works with io.js from v4.0.0.

ipython equivalent for javascript/coffeescript for node.js? [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 7 years ago.
Improve this question
More specifically, is there a REPL that has (more) colorful output, pretty printing, tab completion and the other goodies that ipython has for node.js javascript/coffeescript?
I've recently started a project to provide an enhanced, extensible, embeddable interactive interpreter for multiple languages running on Node (including built-in support for CoffeeScript) here:
http://danielgtaylor.github.com/nesh/
It's pretty basic at the moment but it already provides a nice base with multi-language support and an asynchronous plugin architecture, a small set of built-in utility functions, etc. Let me know if there are any specific features you are looking for :-)
To my knowledge, node and coffee are the only full-featured command-line REPLs for Node.js and CoffeeScript (respectively) right now. In their latest iterations, both offer some degree of colorful output, pretty printing, and completion.
This is the best REPL available - https://github.com/princejwesley/Mancy
Ankit, I was looking for exactly the same answer and ended up implementing it, perhaps it could be helpful for you as well: https://github.com/mksenzov/i.js
Have you tried the console in Chrome Dev Tools?
or this one: http://jsconsole.com/
Ok so for input commands history you can use this:
http://blog.doteight.com/blog/2011/01/16/rlwrap-and-node/
but this way the tab completion doesn't work...
anyone know how to call node interpreter with
tab autocomletion turned on?

Javascript library for dockable panels/tabs? [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 7 years ago.
Improve this question
In the process of converting a .NET rich application to Javascript. One of the GUI features folks liked a lot was to rearrange their application layout. In .NET this was accomplished via Sandock:
http://www.divelements.com/net/controls/sanddock/screenshots.aspx
Anything like this for Javascript?
The closest I know to that is the javascript library ExtJS. I've used it in a few projects very successfully since it allows you to create rich Web UIs very similar to windows UIs (or widgets).
The learning curve can be a bit steep though if you aren't that familiar with javascript, however the community is quick to respond and helpful.
If ExtJS is not your cup of tea, there is a rather nice jquery port of the same concept.
Demos here:
http://layout.jquery-dev.net/demos.cfm (particularly this)
I needed this very thing, and did not find any to my liking so I decided to write my own. It is almost complete, but you can check it out here:
Edit: Still being developed actively, but fully functional now.
http://docker.webcabin.org/
If you are still looking for a javascript dock panel implmentation, I just created one myself. You can find it at https://github.com/developerDoug/HtmlJavascriptDockInVS2010

What IDE to use for standalone Javascript debugging? [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 7 years ago.
Improve this question
I have a few projects that are scripted via javascript. Not a web pages, unfortunately - just a javascript code that calls a few external methods like api.Log( "This is log" );. Is it some IDE exists that i can use to debug such javascript code? I just want to run some unit tests on math and logic so i can break into program, walk it step-by-step and see what is going around. I have tried Visual Studio for Web Developers, aptanta, eclipse - but all of them wants badly to integrade into web browser and debug 'web pages with some javascript' :(. Maybe anyone can suggest a better solution? Maybe some Emacs extension? :) Or IDE / IDE extension / Eclipse distro / IDEA fork i don't know about?
You could use Aptana Studio..

Browserless, ant-task-oriented Javascript Unit Testing? [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 7 years ago.
Improve this question
I'm looking for a javascript unit test framework that I can use as part of my automated maven build. This CANNOT use an actual browser, and it MUST be fully browserless.
I've tried looking at a few posts on SO, but none seem to meet my needs. Is there such a javascript unit tester? I'm anxious to find out.
I was trying to solve the same problem. It seems, that this is not as common, as one might think from our perspective.
RhinoUnit looks very good.
If you need browser capabilities within Rhino, take a look at
http://ejohn.org/blog/bringing-the-browser-to-the-server/
http://groups.google.com/group/envjs
http://github.com/thatcher/env-js/tree/master
There are two projects called JSUnit (www.jsunit.net) and (jsunit.berlios.de). The latter is designed to work with Rhino and Maven. Note that there will be browser-specific problems that such tests will not discover, but it should help with basic functionality.
Not sure about a JavaScript unit testing framework, though I'm sure there is one. But I would probably look towards Rhino as JS interpreter.
http://www.mozilla.org/rhino/
If your JS references any of the browser/DOM you'll also need to mock/stub those...
Have you tried JSunit?
AFAIK, javascript is a language specifically designed to run in the browser.
Have you considereds j-unit tests? They do still run in the browser however.

Categories

Resources