Unit testing is a method by which individual units of source code are tested to determine if they are fit for use.

learn more… | top users | synonyms

1
vote
1answer
73 views

Production code to be good for unit testing

I would like to advise if the following production code is good to be unit tested. The segment of the production code gets data from a backend service and displays it on the page. It is a class: ... ...
1
vote
1answer
117 views

Testing the same code with different input data

I would like to get an advice regarding how to test the same code with different input data. I would like to test that method operationSucceeded will be invoked for all successful status codes. Here ...
5
votes
0answers
145 views

Doubts about the quality of an API designed for use with minimal effort

This is going to be long, and I do hope it is going to make some kind of sense; I apologize if it doesn't. I'll try to provide exactly the amount of context that is necessary to understand the ...
2
votes
0answers
18 views

Shaky on QUnit folder structure

I want to write something serious in JavaScript for the first time in my life. Knowing this, I want to do TDD and write unit tests. I have experience in JUnit, but yet, how to structure my project ...
1
vote
0answers
42 views

Does this nodeunit test conform to best practices?

I have inherited a node-js project, and I am completely new to it. Fortunately, it is already covered by unit tests. The class under test, FmsRescuers, has the responsibility of sending HTTP requests ...
1
vote
0answers
186 views

flask-SQLAlchemy models and unit-testing

I believe this post belongs here vs stackoverflow or Database administrators but let me know if i'm wrong. This is my first time building anything remotely like a robust database. I'm midway through ...
1
vote
0answers
107 views

How to refactor my controller specs?

In my project (https://github.com/GCorbel/comment-my-projects) I have this kind of code to test my controllers. #encoding=utf-8 require 'spec_helper' describe ProjectsController do let!(:project) ...
0
votes
0answers
113 views

I implemented a User model with BackboneJS and RequireJS with test cases in Jasmine. How can I improve?

I've been taking a stab at implementing test cases using the Jasmine testing framework. To do so, I've made an application which has a User object. This User object is created by the server, but its ...
0
votes
0answers
56 views

Testing WordPress with Mockery and a Facade

I've put together this gist with an idea about testing WordPress themes and plugins with Mockery and a WordPress facade object. I've love some feedback on the approach, please. WordPressFacade ...
0
votes
0answers
105 views

Testing Backbone Model using Jasmine

It is the first time I write a javascript test for a Backbone Model. Looking in the web resource there are not so many items about this subject. I found this one, Testing Backbone applications with ...
0
votes
0answers
41 views

Custom unit test engine

I am writing a fairly large hobby project in JScript and testing it on WScript. I decided that it would be a good idea to have some unit testing. This is what I came up with. var tests = []; ...