Skip to content

Instantly share code, notes, and snippets.

@steida
Created February 20, 2010 20:59
Show Gist options
  • Save steida/309910 to your computer and use it in GitHub Desktop.
Save steida/309910 to your computer and use it in GitHub Desktop.
YUI().use('console', 'console-filters', 'test', 'json', function(Y) {
addTestCase = function(fn) {
var testCase = new Y.Test.Case(fn(Y.Assert, Y));
Y.Test.Runner.add(testCase);
};
Y.on('domready', function() {
var yconsole = new Y.Console({
newestOnTop: true,
plugins: [Y.Plugin.ConsoleFilters]
});
yconsole.render();
yconsole.get('boundingBox').setStyle('opacity', .5);
yconsole.filter.hideCategory('pass', 'info');
Y.Test.Runner.subscribe(Y.Test.Runner.COMPLETE_EVENT, function() {
yconsole.get('boundingBox').setStyle('opacity', .9);
});
Y.Test.Runner.run();
});
});
addTestCase(function(assert, Y) {
var something;
return {
name: 'Something Test',
'something instantiation should work': function() {
something = new Something();
assert.isNotUndefined(something);
}
}
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment