Pattern for testing GithubCode() internal methods

Created a custom jQuery plugin for accessing internal methods. See
tests\js\testCases.js for the implementation.

The default behaviour of GithubCode() is to add a $.data attribute to
the <code/> but then replace the <code/> element altogether. While this
does a good job of "cleaning" the markup, at first it made it difficult
to test internal methods of GithubCode(). However, because chaining is
supported in the original plugin, a test helper plugin gave access to
the internals:

// chainedTest() -- Runs a test callback function based on the supplied
options
$.fn.chainedTest = function (o) {
return this.each(function () {
if ($.data(this, o.dataKey)) {
if ($.data(this, o.dataKey)[o.functionName]) {
var output = $.data(this, o.dataKey)[o.functionName](o.arg0, o.arg1,
o.arg2, o.arg3, o.arg4);
console.log(output);
if (o.callbackTestFunction)
o.callbackTestFunction(output, o.expected, o.expectedMessage);
//return output;
}
}
})
}