From d76e26ac16c16ca30a9c177fa292f5cdf184955e Mon Sep 17 00:00:00 2001 From: James Lal Date: Wed, 27 Jun 2012 19:28:37 +0200 Subject: initial move to support web js --- test-agent/config.json | 3 +++ test-agent/index.html | 29 +++++++++++++++++++++++++++++ test-agent/index.js | 43 +++++++++++++++++++++++++++++++++++++++++++ test-agent/package.json | 0 test-agent/sandbox.html | 34 ++++++++++++++++++++++++++++++++++ 5 files changed, 109 insertions(+) create mode 100644 test-agent/config.json create mode 100644 test-agent/index.html create mode 100644 test-agent/index.js create mode 100644 test-agent/package.json create mode 100644 test-agent/sandbox.html (limited to 'test-agent') diff --git a/test-agent/config.json b/test-agent/config.json new file mode 100644 index 0000000..f4f0f2a --- /dev/null +++ b/test-agent/config.json @@ -0,0 +1,3 @@ +{"tests": [ +"webcals/ical_test.js","webcals/request/abstract_test.js","webcals/request/calendar_query_test.js","webcals/request/propfind_test.js","webcals/resource_root_test.js","webcals/sax/base_test.js","webcals/sax/dav_response_test.js","webcals/sax_test.js","webcals/template_test.js","webcals/templates/calendar_data_test.js","webcals/templates/calendar_filter_test.js","webcals/xhr_test.js" + ]} diff --git a/test-agent/index.html b/test-agent/index.html new file mode 100644 index 0000000..b2e7bb5 --- /dev/null +++ b/test-agent/index.html @@ -0,0 +1,29 @@ + + + + + + Serve the tests + + + + + + +
+
+ + + + + + + + diff --git a/test-agent/index.js b/test-agent/index.js new file mode 100644 index 0000000..637062b --- /dev/null +++ b/test-agent/index.js @@ -0,0 +1,43 @@ +(function(window) { + + var worker = new TestAgent.BrowserWorker({ + /* this is where your tests will be loaded into */ + sandbox: './sandbox.html' + }); + + worker.use(TestAgent.BrowserWorker.Config, { + /* config file which lists all available tests for the ui */ + url: './config.json' + }); + + worker.use(TestAgent.BrowserWorker.MochaDriver, { + /* path to mocha */ + mochaUrl: '../vendor/mocha.js', + testHelperUrl: '../test/helper.js', + reporter: 'HTML' + }); + + worker.use(TestAgent.BrowserWorker.Websocket); + worker.use(TestAgent.BrowserWorker.TestUi); + worker.use(TestAgent.BrowserWorker.ErrorReporting); + + worker.on({ + + 'sandbox': function() { + }, + + 'open': function() { + console.log('socket open'); + }, + + 'close': function() { + console.log('lost client trying to reconnect'); + } + + }); + + worker.config(); + worker.start(); + +}(this)); + diff --git a/test-agent/package.json b/test-agent/package.json new file mode 100644 index 0000000..e69de29 diff --git a/test-agent/sandbox.html b/test-agent/sandbox.html new file mode 100644 index 0000000..8b8fb94 --- /dev/null +++ b/test-agent/sandbox.html @@ -0,0 +1,34 @@ + + + + + Tests + + + + + + + + +
+
+ + +
+
+ + + + + -- cgit