Tagged Questions
2
votes
2answers
159 views
JavaScript…what to unit test
I would like to hear other people's opinion on what to unit test in JavaScript. I've been thinking about it and experimenting and let me present what seems to me the right thing. First of all, in ...
2
votes
2answers
217 views
How do you manage your javascript unit tests?
When you are writing JavaScript unit tests, where do you put all the test code?
I see two potential approaches:
Leave all your test code with your regular web project and explictly don't release ...
4
votes
2answers
2k views
How do you handle measuring Code Coverage in JavaScript
In order to measure Code Coverage for JavaScript unit tests, one needs to instrument the code, run the tests and then perform post-processing.
My concern is that, as a result, you are unit testing ...
1
vote
1answer
84 views
When writing tests for a Wordpress plugin, should i run them inside wordpress or in a normal browser?
I have started using BDD for a wordpress plugin i'm working on and i'm rewriting the js codebase to do tests. I've encountered a few problems but i'm going steady now, i was wondering if i had the ...
5
votes
5answers
337 views
How does one unit test an algorithm
I was recently working on a JS slideshow which rotates images using a weighted average algorithm. Thankfully, timgilbert has written a weighted list script which implements the exact algorithm I ...
2
votes
2answers
183 views
In javascript and other languages which lack a compiler, is unit testing a good method to ensure correct syntax and variable naming?
I've been working on a medium sized web application that makes very heavy use of javascript. I tend to introduce common errors per 10 lines of code with either an unknown variable name or function ...
8
votes
3answers
505 views
What should be tested in Javascript?
At work, we've just started on a heavily Javascript based application (actually using Coffeescript, but still), of which I've been implementing an automated test system using JsTestDriver and fabric.
...
12
votes
8answers
860 views
What do you use for JavaScript Testing (TDD)?
What do you use for JavaScript testing both server-side and client-side?
1
vote
2answers
844 views
Using JSTestdriver to test UI/DOM?
Can JSTestDriver be used to test DOM behaviors and interactions?
I see I can write tests to exercise pure JS but how do I go about testing against HTML or DOM?
Can I deliver with each test HTML for ...
2
votes
3answers
857 views
Can I test effectively javascript functions with a PHP unit-testing framework?
If I want to unit-test some of my javascript functions, would it be more efficient (and doable) to use the already installed PHP unit-testing framework, or should I use a javascript unit-testing ...