October 11th in Unit Testing by . no comment .

Unit Testing with JavaScript — Part 4: Automation

Now that we know unit testing best practices; and we have a o2.Unit test runner to do assertions, run and report our test suites; and we know how to construct test suites to be used in this test suite runner; it’s time to develop a methodology that’ll enable us execute …

Continue Reading
September 18th in Unit Testing by . no comment .

Unit Testing with JavaScript — Part 2: Preparation

In the previous article, we’ve seen what a unit test is, and we’ve learned the best practices to write a proper unit test suite. Now it’s time to get our hands dirty . In this tutorial, we will create a unit test runner. Navigation This is Part 2 of a …

Continue Reading
April 26th in Factory, Patterns and Practices, Tutorial by . no comment .

Charlie’s Chocolate Factory in JavaScript

The o2.Debugger that we’ve created a priori, has a single println method that simply outputs what’s sent to it as a parameter to the console or a selected DOM container. In this discussion, we’ll try to polish o2.Debugger further and add three utility methods: assert, error, and log. In the …

Continue Reading
April 25th in o2.js Modules by . no comment .

Update on “o2.Debugger”

I’ve updated the o2.Debugger object to adhere the module pattern that we’ve discussed before. You can click here, to get the source code (1.44K zipped archive) »» The updated source code is as follows: //create an o2 namespace if not alraedy created if(typeof o2 == 'undefined'){var o2={};} /** * o2.Debugger …

Continue Reading
April 22nd in o2.js Modules by . no comment .

How to Create a Simple JavaScript Debugger

What’s the Catch? Okay, we will try to learn the intricacies of JavaScript. In order to do achieve this, however, sooner or later, we will need a medium, like a console, to test our results. Debugging is a crucial part of development. It becomes even more important if you are …

Continue Reading
o2.js _
Fork Ribbon