45
45
module.teardown = function(testcase) {
46
46
var fixtures = testcase._lp_fixture_setups;
47
if (Y.Lang.isUndefined(fixtures)) {
48
// Nothing to be done.
47
51
var data = Y.QueryString.stringify(
48
52
{action: 'teardown',
49
53
fixtures: fixtures.join(','),
62
66
delete testcase._lp_fixture_data;
65
}, "0.1", {"requires": ["io", "json", "querystring"]});
69
module.run = function(suite) {
70
var handle_complete = function(data) {
71
window.status = '::::' + Y.JSON.stringify(data);
73
Y.Test.Runner.on('complete', handle_complete);
74
var handle_pass = function(data) {
75
window.status = '>>>>' + Y.JSON.stringify(
76
{testCase: data.testCase.name,
77
testName: data.testName,
81
Y.Test.Runner.on('pass', handle_pass);
82
var handle_fail = function(data) {
83
window.status = '>>>>' + Y.JSON.stringify(
84
{testCase: data.testCase.name,
85
testName: data.testName,
87
error: data.error.getMessage()
90
Y.Test.Runner.on('fail', handle_fail);
91
Y.Test.Runner.add(suite);
93
var console = new Y.Console({newestOnTop: false});
95
Y.on('domready', function() {
96
console.render('#log');
104
"io", "json", "querystring", "test", "console", "lp.client"]});