cordova-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From brianler...@apache.org
Subject [3/3] js commit: removed old runner logic into tasks
Date Thu, 12 Dec 2013 03:33:27 GMT
removed old runner logic into tasks


Project: http://git-wip-us.apache.org/repos/asf/cordova-js/repo
Commit: http://git-wip-us.apache.org/repos/asf/cordova-js/commit/c608726a
Tree: http://git-wip-us.apache.org/repos/asf/cordova-js/tree/c608726a
Diff: http://git-wip-us.apache.org/repos/asf/cordova-js/diff/c608726a

Branch: refs/heads/master
Commit: c608726a8e8a139545113224eb3c9b62d8e75dd8
Parents: a7a5b11
Author: brianleroux <b@brian.io>
Authored: Thu Dec 12 14:29:31 2013 +1100
Committer: brianleroux <b@brian.io>
Committed: Thu Dec 12 14:29:31 2013 +1100

----------------------------------------------------------------------
 test/runner.js | 79 -----------------------------------------------------
 1 file changed, 79 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cordova-js/blob/c608726a/test/runner.js
----------------------------------------------------------------------
diff --git a/test/runner.js b/test/runner.js
deleted file mode 100644
index e64eb40..0000000
--- a/test/runner.js
+++ /dev/null
@@ -1,79 +0,0 @@
-/*
- *
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *   http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
- *
-*/
-
-var fs       = require('fs');
-var util     = require('util');
-var _path    = require('path');
-var exec     = require('child_process').exe;
-var tests    = [];
-var packager = require('./../tasks/lib/packager');
-var bundle   = require('./../tasks/lib/bundle');
-var collect  = require('./../tasks/lib/collect');
-
-
-module.exports = {
-    browser: function () {
-        console.log('starting browser-based tests')
-        var connect = require('connect'),
-            html = fs.readFileSync(__dirname + "/suite.html", "utf-8"),
-            doc,
-            modules,
-            specs,
-            app = connect(
-                connect.static(_path.join(__dirname, '..', 'tasks', 'vendor')),
-                connect.static(__dirname),
-                connect.router(function (app) {
-                    app.get('/cordova.test.js', function (req, res) {
-                        res.writeHead(200, {
-                            "Cache-Control": "no-cache",
-                            "Content-Type": "text/javascript"
-                        });
-                        res.end(bundle('test'));
-                    }),
-                    app.get('/', function (req, res) {
-                        res.writeHead(200, {
-                            "Cache-Control": "no-cache",
-                            "Content-Type": "text/html"
-                        });
-
-                        //create the script tags to include
-                        tests = [];
-                        collect(__dirname, tests);
-                        specs = tests.map(function (file, path) {
-                            return '<script src="' + file.replace(/^.*\/test\//, "/")
+
-                                '" type="text/javascript" charset="utf-8"></script>';
-                        }).join('');
-
-                        //inject in the test script includes and write the document
-                        doc = html.replace(/<!-- ##TESTS## -->/g, specs);
-                        res.end(doc);
-                    });
-                })
-            );
-
-        app.listen(3000);
-
-        process.stdout.write("Test Server running on:\n");
-        process.stdout.write("http://127.0.0.1:3000\n");
-
-        exec('open http://127.0.0.1:3000');
-    }
-};


Mime
View raw message