- Recent
- Popular
- Tags (6)
- Subscribers (43)
- Which Unit Testing Framework?July 2
-
I'm in the process of working on, and improving, test suite support in TestSwarm (an upcoming project of mine). However, there isn't a lot of information on which unit testing frameworks developers actually use to test their code (whereas there is more information on which JavaScript libraries are used).
It will be of great help to me if you could quickly fill out the question below. I will release the results of the survey as soon as possible. Thanks!
» Which JavaScript Unit Testing Frameworks do you use?
Loading...
More information on the frameworks listed above:
- JSConf Talk: Games, Performance, TestSwarmJune 30
-
The video from my talk at JSConf has been posted. Thanks to Chris for organizing the conference and the excellent quality of the video.
The description from the JSConf site summarizes the talk well:
John Resig presents his mystery topic, which is actually three topics that strike his interest. First up is measuring performance and a quick introduction to benchmarking (and its positives and negatives). This is followed by JavaScript Games which he unveils some super cool hidden functionality (cheat codes++) on the jQuery web site. This is followed up by the introduction of John's distributed continuous test framework platform, Test Swarm. It is jam packed with Nirvana and goodness so be sure to watch both parts.
Part 1: Measuring JavaScript Performance, JavaScript Games
Part 2: Distributed JavaScript Testing, Q&A
Additionally, the slides from the talk are up on Slideshare.
- Unimpressed by NodeIteratorJune 19
-
I just posted a run down of some of the new DOM Traversal APIs in Firefox 3.5. The first half of the post is mostly a recap of my old Element Traversal API post.
The second half of the post is all about the new NodeIterator API that was just implemented. For those that are familiar with some of the DOM TreeWalker APIs this will look quite familiar.
It's my opinion, though, that this API is, at best, bloated, and at worst incredibly misguided and impractical for day-to-day use.
Observe the method signature of createNodeIterator:
var nodeIterator = document.createNodeIterator(
root, // root node for the traversal
whatToShow, // a set of constants to filter against
filter, // an object with a function for advanced filtering
entityReferenceExpansion // if entity reference children so be expanded
);This is excessive for what should be, at most, a simple way to traverse DOM nodes.
To start, you must create a NodeIterator using the
- ECMAScript 5 Strict Mode, JSON, and MoreMay 21
-
Previously I analyzed ECMAScript 5's Object and Property system. This is a huge new aspect of the language and deserved its special consideration.
There are a number of other new features and APIs that need attention, as well. The largest of which are Strict Mode and native JSON support.
Strict Mode
Strict Mode is a new feature in ECMAScript 5 that allows you to place a program, or a function, in a "strict" operating context. This strict context prevents certain actions from being taken and throws more exceptions (generally providing the user with more information and a tapered-down coding experience).
Since ECMAScript 5 is backwards-compatible with ECMAScript 3, all of the "features" that were in ECMAScript 3 that were "deprecated" are just disabled (or throw errors) in strict mode, instead.
Strict mode helps out in a couple ways:
- It catches some common coding bloopers, throwing exceptions.
- It prevents, or throws errors, when relatively "unsafe" actions are taken (such as gaining access to the global object).
- It disables features that are confusing or poorly thought out.
Most of the information about strict mode can be found in the ES5 specification [PDF] on page #223.
It should be noted that ECMAScript 5's strict
- ECMAScript 5 Objects and PropertiesMay 20
-
ECMAScript 5 is on its way. Rising from the ashes of ECMAScript 4, which got scaled way back and became ECMAScript 3.1, which was then re-named ECMAScript 5 (more details)- comes a new layer of functionality built on top of our lovable ECMAScript 3.
Update: I've posted more details on ECMAScript 5 Strict Mode, JSON, and More.
There are a few new APIs included in the specification but the most interesting functionality comes into play in the Object/Property code. This new code gives you the ability to dramatically affect how users will be able to interact with your objects, allowing you to provide getters and setters, prevent enumeration, manipulation, or deletion, and even prevent the addition of new properties. In short: You will be able to replicate and expand upon the existing JavaScript-based APIs (such as the DOM) using nothing but JavaScript itself.
Perhaps best of all, though: These features are due to arrive in all major browsers. All the major browser vendors worked on this specification and have agreed to implement it in their respective engines. The exact timeframe isn't clear yet, but it's going to be sooner, rather than later.
There doesn't appear to exist a full implementation of ES5 at this point, but there are a few in the works. In the meantime yo
