0
votes
1answer
83 views

Is my JavaScript test actually testing anything worthwhile here

Given a production module like this: function ($) { var showForm = function () { $.get(url, function (html) { $('body').append(html); }); }; ...
1
vote
1answer
107 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: ... ...
0
votes
0answers
34 views

Node.js: Is this factory method a good approach?

We are beginning to learn Node.js and we are not always sure if we do it the right way. We have a strong object oriented background so the adoption is not always easy. Right now we implemented a ...
2
votes
0answers
31 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 ...
0
votes
0answers
150 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 ...
2
votes
1answer
46 views

Testing a mixin function

I have a mixin function which is as follows - function mixin(receiver, supplier) { for (var property in supplier) { if (supplier.hasOwnProperty(property)) { ...
2
votes
1answer
205 views

my constructor is doing work. Is this a code smell in this example?

I have created a queue in javascript. This queue also has blocking take(). As you all probably know this is not really true, because javascript does not have threads. It just wait until element has ...