This is an automated email from the ASF dual-hosted git repository.
erisu pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/cordova-paramedic.git
The following commit(s) were added to refs/heads/master by this push:
new 39ba6a7 chore: various refactoring & cleanup (#287)
39ba6a7 is described below
commit 39ba6a733478b92fca8600c43dd3200ff04e8e23
Author: エリス <[email protected]>
AuthorDate: Wed Dec 17 10:32:01 2025 +0900
chore: various refactoring & cleanup (#287)
* chore: format license header
* chore(main.js): refactor, const, string literals, & removed unused code
* chore: remove unnecessary node shebang
* chore: double-quote to single-quote, linting, test cleanup
* chore: cleanup package metadata & internal packages
* chore: double-quote to single-quote, const, docs
* chore: lint everything
* chore: fix internal plugin versions
* chore: add file ending newline
---
README.md | 15 +-
ci-plugin/ci.js | 8 +-
ci-plugin/package.json | 16 +-
ci-plugin/plugin.xml | 42 ++--
eslint.config.js | 6 +-
ios-geolocation-permissions-plugin/package.json | 15 +-
ios-geolocation-permissions-plugin/plugin.xml | 43 ++---
.../src/ios/CDVAllowLocation.m | 30 +--
lib/LocalServer.js | 2 +-
lib/ParamedicApp.js | 4 +-
lib/ParamedicAppUninstall.js | 2 +-
lib/ParamedicConfig.js | 2 +-
lib/ParamedicKill.js | 4 +-
lib/ParamedicLogCollector.js | 4 +-
lib/ParamedicTargetChooser.js | 2 +-
lib/ParamediciOSPermissions.js | 4 +-
lib/PluginsManager.js | 2 +-
lib/Reporters.js | 2 +-
lib/paramedic.js | 2 +-
lib/utils/index.js | 2 +-
lib/utils/spawn.js | 2 +-
lib/utils/utilities.js | 4 +-
main.js | 213 ++++++++++-----------
package.json | 4 +-
paramedic-plugin/JasmineParamedicProxy.js | 27 +--
paramedic-plugin/package-lock.json | 16 --
paramedic-plugin/package.json | 13 +-
paramedic-plugin/paramedic.js | 49 +++--
paramedic-plugin/plugin.xml | 43 +++--
sample-config/.paramedic.config.js | 14 +-
spec/testable-plugin/package.json | 5 +-
spec/testable-plugin/plugin.xml | 44 ++---
spec/testable-plugin/tests/foo/package.json | 5 +-
spec/testable-plugin/tests/package.json | 9 +-
spec/testable-plugin/tests/plugin.xml | 41 ++--
spec/testable-plugin/tests/tests.js | 65 +++----
spec/testable-plugin/www/testable.js | 39 ++--
37 files changed, 370 insertions(+), 430 deletions(-)
diff --git a/README.md b/README.md
index 4e513a3..6fea4f5 100644
--- a/README.md
+++ b/README.md
@@ -317,13 +317,12 @@ Example configuration file is showed below.
```js
module.exports = {
- "plugins": [
- "https://github.com/apache/cordova-plugin-inappbrowser"
- ],
- "platform": "android",
- "action": "run",
- "args": ""
-}
+ verbose: false,
+ plugins: ['https://github.com/apache/cordova-plugin-inappbrowser'],
+ platform: 'android',
+ action: 'run',
+ args: ''
+};
```
More configuration file examples could be found in `sample-config` folder.
@@ -333,6 +332,6 @@ More configuration file examples could be found in
`sample-config` folder.
You can also use `cordova-paramedic` as a module directly:
```javascript
-var paramedic = require('cordova-paramedic');
+const paramedic = require('cordova-paramedic');
paramedic.run(config);
```
diff --git a/ci-plugin/ci.js b/ci-plugin/ci.js
index 721b6cc..bc2109f 100644
--- a/ci-plugin/ci.js
+++ b/ci-plugin/ci.js
@@ -7,7 +7,7 @@
"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
+ 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
@@ -19,11 +19,9 @@
/* global window */
-function CI() {
+function CI () { }
-}
-
-CI.prototype.initialize = function() {
+CI.prototype.initialize = function () {
window.IS_CI = true;
};
diff --git a/ci-plugin/package.json b/ci-plugin/package.json
index 82b9eaf..26e51fd 100644
--- a/ci-plugin/package.json
+++ b/ci-plugin/package.json
@@ -1,14 +1,8 @@
{
"name": "cordova-paramedic-ci",
- "version": "0.5.0",
- "license": "Apache 2.0",
- "description": "Tells Cordova tests that they are running in CI environment
by introducing a global variable",
- "main": "ci.js",
- "engines" : {
- "node" : ">=0.11.2"
- },
- "repository": {
- "type": "git",
- "url": "git://github.com/apache/cordova-paramedic.git"
- }
+ "version": "2.0.0-dev",
+ "private": true,
+ "author": "Apache Software Foundation",
+ "license": "Apache-2.0",
+ "description": "Tells Cordova tests that they are running in CI environment
by introducing a global variable"
}
diff --git a/ci-plugin/plugin.xml b/ci-plugin/plugin.xml
index 689d5f1..e7e029a 100644
--- a/ci-plugin/plugin.xml
+++ b/ci-plugin/plugin.xml
@@ -1,33 +1,33 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
- 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.
+#
+# 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.
+#
-->
-
<plugin xmlns="http://apache.org/cordova/ns/plugins/1.0"
- id="cordova-plugin-paramedic-is-ci"
- version="1.0.0-dev">
+ id="cordova-plugin-paramedic-is-ci"
+ version="2.0.0-dev">
<name>Paramedic CI</name>
<description>Install this plugin to let tests know that they are running
on CI</description>
- <license>Apache 2.0</license>
+ <license>Apache-2.0</license>
<js-module src="ci.js" name="ci">
<runs/>
</js-module>
-
</plugin>
diff --git a/eslint.config.js b/eslint.config.js
index b016c50..a61d313 100644
--- a/eslint.config.js
+++ b/eslint.config.js
@@ -1,4 +1,4 @@
-/*
+/**
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
@@ -17,8 +17,8 @@
under the License.
*/
-const { defineConfig } = require('eslint/config')
-const nodeConfig = require('@cordova/eslint-config/node')
+const { defineConfig } = require('eslint/config');
+const nodeConfig = require('@cordova/eslint-config/node');
module.exports = defineConfig([
...nodeConfig
diff --git a/ios-geolocation-permissions-plugin/package.json
b/ios-geolocation-permissions-plugin/package.json
index 6f54039..68519c6 100644
--- a/ios-geolocation-permissions-plugin/package.json
+++ b/ios-geolocation-permissions-plugin/package.json
@@ -1,13 +1,8 @@
{
"name": "cordova-paramedic-ios-geolocation-permissions",
- "version": "0.5.0",
- "license": "Apache 2.0",
- "description": "Plugin to allow geolocation on iOS simulator w/out
presenting OS dialog",
- "engines" : {
- "node" : ">=0.11.2"
- },
- "repository": {
- "type": "git",
- "url": "git://github.com/apache/cordova-paramedic.git"
- }
+ "version": "2.0.0-dev",
+ "private": true,
+ "author": "Apache Software Foundation",
+ "license": "Apache-2.0",
+ "description": "Plugin to allow geolocation on iOS simulator w/out
presenting OS dialog"
}
diff --git a/ios-geolocation-permissions-plugin/plugin.xml
b/ios-geolocation-permissions-plugin/plugin.xml
index 4f1dade..292fc2d 100644
--- a/ios-geolocation-permissions-plugin/plugin.xml
+++ b/ios-geolocation-permissions-plugin/plugin.xml
@@ -1,30 +1,31 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
- 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.
+#
+# 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.
+#
-->
-
<plugin xmlns="http://apache.org/cordova/ns/plugins/1.0"
- id="ios-geolocation-permissions-plugin"
- version="0.0.1">
+ id="ios-geolocation-permissions-plugin"
+ version="2.0.0-dev">
<name>Geolocation permissions</name>
<description>Plugin to allow geolocation on iOS simulator w/out presenting
OS dialog</description>
- <license>Apache 2.0</license>
+ <license>Apache-2.0</license>
<platform name="ios">
<config-file target="config.xml" parent="/*">
@@ -36,7 +37,5 @@
<source-file src="src/ios/CDVAllowLocation.m" />
<framework src="CoreLocation.framework" />
-
</platform>
-
</plugin>
diff --git a/ios-geolocation-permissions-plugin/src/ios/CDVAllowLocation.m
b/ios-geolocation-permissions-plugin/src/ios/CDVAllowLocation.m
index 5c9b7f4..8e6837b 100644
--- a/ios-geolocation-permissions-plugin/src/ios/CDVAllowLocation.m
+++ b/ios-geolocation-permissions-plugin/src/ios/CDVAllowLocation.m
@@ -1,21 +1,21 @@
/*
- 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
+ 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
+ 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.
- */
+ 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.
+*/
#import <Cordova/CDVPlugin.h>
#import <CoreLocation/CoreLocation.h>
diff --git a/lib/LocalServer.js b/lib/LocalServer.js
index bfcc5ff..7be4e34 100644
--- a/lib/LocalServer.js
+++ b/lib/LocalServer.js
@@ -7,7 +7,7 @@
"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
+ 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
diff --git a/lib/ParamedicApp.js b/lib/ParamedicApp.js
index cb166e5..c3cb363 100644
--- a/lib/ParamedicApp.js
+++ b/lib/ParamedicApp.js
@@ -1,5 +1,3 @@
-#!/usr/bin/env node
-
/**
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
@@ -9,7 +7,7 @@
"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
+ 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
diff --git a/lib/ParamedicAppUninstall.js b/lib/ParamedicAppUninstall.js
index c14cb24..3278c87 100644
--- a/lib/ParamedicAppUninstall.js
+++ b/lib/ParamedicAppUninstall.js
@@ -7,7 +7,7 @@
"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
+ 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
diff --git a/lib/ParamedicConfig.js b/lib/ParamedicConfig.js
index a7bbf5f..6363205 100644
--- a/lib/ParamedicConfig.js
+++ b/lib/ParamedicConfig.js
@@ -7,7 +7,7 @@
"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
+ 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
diff --git a/lib/ParamedicKill.js b/lib/ParamedicKill.js
index 73e565b..df33ba9 100644
--- a/lib/ParamedicKill.js
+++ b/lib/ParamedicKill.js
@@ -1,5 +1,3 @@
-#!/usr/bin/env node
-
/**
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
@@ -9,7 +7,7 @@
"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
+ 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
diff --git a/lib/ParamedicLogCollector.js b/lib/ParamedicLogCollector.js
index 19b603e..0e68d86 100644
--- a/lib/ParamedicLogCollector.js
+++ b/lib/ParamedicLogCollector.js
@@ -1,5 +1,3 @@
-#!/usr/bin/env node
-
/**
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
@@ -9,7 +7,7 @@
"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
+ 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
diff --git a/lib/ParamedicTargetChooser.js b/lib/ParamedicTargetChooser.js
index e82a0df..d698099 100644
--- a/lib/ParamedicTargetChooser.js
+++ b/lib/ParamedicTargetChooser.js
@@ -7,7 +7,7 @@
"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
+ 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
diff --git a/lib/ParamediciOSPermissions.js b/lib/ParamediciOSPermissions.js
index 18b7aff..517e92b 100644
--- a/lib/ParamediciOSPermissions.js
+++ b/lib/ParamediciOSPermissions.js
@@ -1,5 +1,3 @@
-#!/usr/bin/env node
-
/**
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
@@ -9,7 +7,7 @@
"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
+ 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
diff --git a/lib/PluginsManager.js b/lib/PluginsManager.js
index f0a090f..5c38373 100644
--- a/lib/PluginsManager.js
+++ b/lib/PluginsManager.js
@@ -7,7 +7,7 @@
"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
+ 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
diff --git a/lib/Reporters.js b/lib/Reporters.js
index 03f89ef..a8b479f 100644
--- a/lib/Reporters.js
+++ b/lib/Reporters.js
@@ -7,7 +7,7 @@
"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
+ 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
diff --git a/lib/paramedic.js b/lib/paramedic.js
index 630d99d..8a04eb2 100644
--- a/lib/paramedic.js
+++ b/lib/paramedic.js
@@ -7,7 +7,7 @@
"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
+ 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
diff --git a/lib/utils/index.js b/lib/utils/index.js
index 978ded4..b89b123 100644
--- a/lib/utils/index.js
+++ b/lib/utils/index.js
@@ -7,7 +7,7 @@
"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
+ 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
diff --git a/lib/utils/spawn.js b/lib/utils/spawn.js
index 2b0f063..b4d5a6e 100644
--- a/lib/utils/spawn.js
+++ b/lib/utils/spawn.js
@@ -1,4 +1,4 @@
-/*
+/**
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
diff --git a/lib/utils/utilities.js b/lib/utils/utilities.js
index 4959129..4bec00b 100644
--- a/lib/utils/utilities.js
+++ b/lib/utils/utilities.js
@@ -1,5 +1,3 @@
-#!/usr/bin/env node
-
/**
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
@@ -9,7 +7,7 @@
"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
+ 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
diff --git a/main.js b/main.js
index 131701b..af28efd 100755
--- a/main.js
+++ b/main.js
@@ -1,6 +1,6 @@
#!/usr/bin/env node
-/*
+/**
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
@@ -19,118 +19,111 @@
under the License.
*/
-var parseArgs = require('minimist');
-var path = require('path');
-var paramedic = require('./lib/paramedic');
-var ParamedicConfig = require('./lib/ParamedicConfig');
-var util = require('./lib/utils').utilities;
-
-var USAGE = "Error missing args. \n" +
- "\n" +
- "cordova-paramedic --platform PLATFORM --plugin PATH [--justbuild
--timeout MSECS --startport PORTNUM --endport PORTNUM --version ...]\n" +
- "\n" +
- "--platform PLATFORM : the platform id. Currently supports 'ios',
'browser' 'android'.\n" +
- "\tPath to platform can be specified as link to git repo
like:\n" +
-
"\tandroid@https://github.com/apache/cordova-android.git\n" +
- "\tor path to local copied git repo like:\n" +
- "\tandroid@../cordova-android/\n" +
- "--plugin PATH : the relative or absolute path to a plugin folder\n" +
- "\texpected to have a 'tests' folder.\n" +
- "\tYou may specify multiple --plugin flags and they will
all\n" +
- "\tbe installed and tested together.\n" +
- "\n" +
- "--args: (optional) add command line args to the \"cordova build\" and
\"cordov run\" commands \n" +
- "--ci : (optional) Skip tests that require user interaction\n" +
- "--cleanUpAfterRun : (optional) cleans up the application after the run\n"
+
- "--cli : (optional) A path to Cordova CLI\n" +
- "--config : (optional) read configuration from paramedic configuration
file\n" +
- "--justbuild : (optional) just builds the project, without running the
tests \n" +
- "--outputDir : (optional) path to save Junit results file & Device logs\n"
+
- "--skipMainTests : (optional) Do not run main (cordova-test-framework)
tests\n" +
- "--startport/--endport `PORTNUM` : (optional) ports to find available and
use for posting results from emulator back to paramedic server (default is from
8008 to 8009)\n" +
- "--target : (optional) target to deploy to\n" +
- "--tccDb : (optional) iOS only - specifies the path for the TCC.db file to
be copied.\n" +
- "--timeout `MSECS` : (optional) time in millisecs to wait for tests to
pass|fail \n" +
- "\t(defaults to 10 minutes) \n" +
- "--verbose : (optional) verbose mode. Display more information output\n" +
- "--version : (optional) prints cordova-paramedic version and exits\n" +
- "";
-
-var argv = parseArgs(process.argv.slice(2), {
- "string": ["plugin"]
-});
-var pathToParamedicConfig = util.getConfigPath(argv.config);
+const parseArgs = require('minimist');
+
+const paramedic = require('./lib/paramedic');
+const ParamedicConfig = require('./lib/ParamedicConfig');
+const { utilities } = require('./lib/utils');
+
+const USAGE = `Error missing args.
+
+cordova-paramedic --platform PLATFORM --plugin PATH [--justbuild --timeout
MSECS --startport PORTNUM --endport PORTNUM --version ...]
+
+--platform PLATFORM : the platform id. Currently supports 'ios', 'browser'
'android'.
+ Path to platform can be specified as link to git repo like:
+ android@https://github.com/apache/cordova-android.git
+ or path to local copied git repo like:
+ android@../cordova-android/
+--plugin PATH : the relative or absolute path to a plugin folder
+ expected to have a 'tests' folder.
+ You may specify multiple --plugin flags and they will all
+ be installed and tested together.
+
+--args: (optional) add command line args to the "cordova build" and "cordov
run" commands
+--ci : (optional) Skip tests that require user interaction
+--cleanUpAfterRun : (optional) cleans up the application after the run
+--cli : (optional) A path to Cordova CLI
+--config : (optional) read configuration from paramedic configuration file
+--justbuild : (optional) just builds the project, without running the tests
+--outputDir : (optional) path to save Junit results file & Device logs
+--skipMainTests : (optional) Do not run main (cordova-test-framework) tests
+--startport/--endport PORTNUM : (optional) ports to find available and use for
posting results from emulator back to paramedic server (default is from 8008 to
8009)
+--target : (optional) target to deploy to
+--tccDb : (optional) iOS only - specifies the path for the TCC.db file to be
copied.
+--timeout MSECS : (optional) time in millisecs to wait for tests to pass|fail
+ (defaults to 10 minutes)
+--verbose : (optional) verbose mode. Display more information output
+--version : (optional) prints cordova-paramedic version and exits
+`;
+
+const argv = parseArgs(process.argv.slice(2), { string: ['plugin'] });
+const pathToParamedicConfig = utilities.getConfigPath(argv.config);
if (argv.version) {
- console.log(require('./package.json')['version']);
+ console.log(require('./package.json').version);
process.exit(0);
-} else if (pathToParamedicConfig || // --config
- argv.platform && argv.plugin) { // or --platform and --plugin
-
- var paramedicConfig = pathToParamedicConfig ?
- ParamedicConfig.parseFromFile(pathToParamedicConfig):
- ParamedicConfig.parseFromArguments(argv);
-
- if (argv.justBuild || argv.justbuild) {
- paramedicConfig.setAction('build');
- }
-
- if (argv.plugin) {
- paramedicConfig.setPlugins(argv.plugin);
- }
-
- if (argv.outputDir) {
- paramedicConfig.setOutputDir(argv.outputDir);
- }
-
- if (argv.logMins) {
- paramedicConfig.setLogMins(argv.logMins);
- }
-
- if (argv.tccDb){
- paramedicConfig.setTccDb(argv.tccDb);
- }
-
- if (argv.platform) {
- paramedicConfig.setPlatform(argv.platform);
- }
-
- if (argv.action) {
- paramedicConfig.setAction(argv.action);
- }
-
- if (argv.skipMainTests) {
- paramedicConfig.setSkipMainTests(argv.skipMainTests);
- }
-
- if (argv.ci) {
- paramedicConfig.setCI(argv.ci);
- }
-
- if (argv.target) {
- paramedicConfig.setTarget(argv.target);
- }
-
- if (argv.cli) {
- paramedicConfig.setCli(argv.cli);
- }
-
- if (argv.args) {
- paramedicConfig.setArgs(argv.args);
- }
-
- paramedic.run(paramedicConfig)
- .then((isTestPassed) => {
- var exitCode = isTestPassed ? 0 : 1;
- console.log('Finished with exit code ' + exitCode);
- process.exit(exitCode);
- })
- .catch((error) => {
- console.error(error && error.stack ? error.stack : error);
- process.exit(1);
- });
-
-} else {
+}
+
+if (!pathToParamedicConfig && (!argv.platform || !argv.plugin)) {
console.log(USAGE);
process.exit(1);
}
+
+const paramedicConfig = pathToParamedicConfig
+ ? ParamedicConfig.parseFromFile(pathToParamedicConfig)
+ : ParamedicConfig.parseFromArguments(argv);
+
+if (argv.justBuild || argv.justbuild) {
+ paramedicConfig.setAction('build');
+}
+
+if (argv.plugin) {
+ paramedicConfig.setPlugins(argv.plugin);
+}
+
+if (argv.outputDir) {
+ paramedicConfig.setOutputDir(argv.outputDir);
+}
+
+if (argv.tccDb) {
+ paramedicConfig.setTccDb(argv.tccDb);
+}
+
+if (argv.platform) {
+ paramedicConfig.setPlatform(argv.platform);
+}
+
+if (argv.action) {
+ paramedicConfig.setAction(argv.action);
+}
+
+if (argv.skipMainTests) {
+ paramedicConfig.setSkipMainTests(argv.skipMainTests);
+}
+
+if (argv.ci) {
+ paramedicConfig.setCI(argv.ci);
+}
+
+if (argv.target) {
+ paramedicConfig.setTarget(argv.target);
+}
+
+if (argv.cli) {
+ paramedicConfig.setCli(argv.cli);
+}
+
+if (argv.args) {
+ paramedicConfig.setArgs(argv.args);
+}
+
+paramedic.run(paramedicConfig)
+ .then((isTestPassed) => {
+ const exitCode = isTestPassed ? 0 : 1;
+ console.log('Finished with exit code ' + exitCode);
+ process.exit(exitCode);
+ })
+ .catch((error) => {
+ console.error(error && error.stack ? error.stack : error);
+ process.exit(1);
+ });
diff --git a/package.json b/package.json
index 73b5773..7d32d58 100644
--- a/package.json
+++ b/package.json
@@ -1,6 +1,7 @@
{
"name": "cordova-paramedic",
"version": "2.0.0-dev.0",
+ "author": "Apache Software Foundation",
"license": "Apache-2.0",
"description": "Use medic to test a cordova plugin locally",
"main": "paramedic.js",
@@ -15,7 +16,7 @@
"scripts": {
"test": "npm run lint & npm run test-local",
"test-on-windows": "npm run lint & npm run test-local-on-windows",
- "lint": "eslint lib",
+ "lint": "eslint .",
"test-local": "npm run test-browser && npm run test-android && npm run
test-ios",
"test-local-on-windows": "npm run test-browser && npm run test-android",
"test-android": "node main.js --platform android --plugin
./spec/testable-plugin/",
@@ -28,7 +29,6 @@
"medic",
"test"
],
- "author": "Apache Software Foundation",
"dependencies": {
"cordova-common": "^6.0.0",
"jasmine-reporters": "^2.5.2",
diff --git a/paramedic-plugin/JasmineParamedicProxy.js
b/paramedic-plugin/JasmineParamedicProxy.js
index 40aa9d7..a58876f 100644
--- a/paramedic-plugin/JasmineParamedicProxy.js
+++ b/paramedic-plugin/JasmineParamedicProxy.js
@@ -8,7 +8,7 @@
"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
+ 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
@@ -18,12 +18,12 @@
under the License.
*/
-var platformMap = {
- 'ipod touch':'ios',
- 'iphone':'ios'
+const platformMap = {
+ 'ipod touch': 'ios',
+ iphone: 'ios'
};
-function JasmineParamedicProxy(socket) {
+function JasmineParamedicProxy (socket) {
this.socket = socket;
this.specExecuted = 0;
this.specFailed = 0;
@@ -57,11 +57,12 @@ JasmineParamedicProxy.prototype.suiteDone = function
(payload) {
};
JasmineParamedicProxy.prototype.jasmineDone = function (payload) {
- var p = 'Desktop';
- var devmodel = 'none';
- var version = cordova.version;
+ let platform = 'Desktop';
+ let devmodel = 'none';
+ let version = cordova.version;
+
if (typeof device !== 'undefined') {
- p = device.platform.toLowerCase();
+ platform = device.platform.toLowerCase();
devmodel = device.model || device.name;
version = device.version.toLowerCase();
}
@@ -70,15 +71,15 @@ JasmineParamedicProxy.prototype.jasmineDone = function
(payload) {
// include platform info
payload.cordova = {
- platform: (platformMap.hasOwnProperty(p) ? platformMap[p] : p),
- version: version,
+ platform: (Object.prototype.hasOwnProperty.call(platformMap, platform)
? platformMap[platform] : platform),
+ version,
model: devmodel
};
// include common spec results
payload.specResults = {
- specExecuted : this.specExecuted,
- specFailed : this.specFailed
+ specExecuted: this.specExecuted,
+ specFailed: this.specFailed
};
this.socket.cdvSendEvent('jasmineDone', payload);
diff --git a/paramedic-plugin/package-lock.json
b/paramedic-plugin/package-lock.json
deleted file mode 100644
index 23fbb63..0000000
--- a/paramedic-plugin/package-lock.json
+++ /dev/null
@@ -1,16 +0,0 @@
-{
- "name": "cordova-paramedic-ci",
- "version": "0.5.0",
- "lockfileVersion": 2,
- "requires": true,
- "packages": {
- "": {
- "name": "cordova-paramedic-ci",
- "version": "0.5.0",
- "license": "Apache 2.0",
- "engines": {
- "node": ">=12.0.0"
- }
- }
- }
-}
diff --git a/paramedic-plugin/package.json b/paramedic-plugin/package.json
index 3026f0d..fcce7cb 100644
--- a/paramedic-plugin/package.json
+++ b/paramedic-plugin/package.json
@@ -1,11 +1,8 @@
{
"name": "cordova-paramedic-ci",
- "version": "0.5.0",
- "license": "Apache 2.0",
- "description": "Cordova Paramedic Plugin is responsible for the test results
reporting",
- "main": "paramedic.js",
- "engines": {
- "node": ">=12.0.0"
- },
- "repository": "github:apache/cordova-paramedic"
+ "version": "2.0.0-dev",
+ "private": true,
+ "author": "Apache Software Foundation",
+ "license": "Apache-2.0",
+ "description": "Cordova Paramedic Plugin is responsible for the test results
reporting"
}
diff --git a/paramedic-plugin/paramedic.js b/paramedic-plugin/paramedic.js
index ae39108..8bbc8a7 100644
--- a/paramedic-plugin/paramedic.js
+++ b/paramedic-plugin/paramedic.js
@@ -1,4 +1,4 @@
-/* global window, cordova, device, jasmine, XMLHttpRequest */
+/* global window, cordova, jasmine, XMLHttpRequest */
/**
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
@@ -8,7 +8,7 @@
"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
+ 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
@@ -18,15 +18,15 @@
under the License.
*/
-var PARAMEDIC_SERVER_DEFAULT_URL = 'http://127.0.0.1:8008';
+const PARAMEDIC_SERVER_DEFAULT_URL = 'http://127.0.0.1:8008';
-function Paramedic() {
+function Paramedic () {
}
-Paramedic.prototype.initialize = function() {
- var me = this;
- var connectionUri = me.loadParamedicServerUrl();
+Paramedic.prototype.initialize = function () {
+ const me = this;
+ const connectionUri = me.loadParamedicServerUrl();
const socket = new WebSocket(connectionUri);
/**
@@ -70,31 +70,30 @@ Paramedic.prototype.initialize = function() {
window.PARAMEDIC = true;
};
-
Paramedic.prototype.overrideConsole = function () {
- var origConsole = window.console;
- var me = this;
+ const origConsole = window.console;
+ const me = this;
- function createCustomLogger(type) {
+ function createCustomLogger (type) {
return function () {
origConsole[type].apply(origConsole, arguments);
- me.socket.cdvSendEvent('deviceLog', { type: type, msg:
Array.prototype.slice.apply(arguments) });
+ me.socket.cdvSendEvent('deviceLog', { type, msg:
Array.prototype.slice.apply(arguments) });
};
}
window.console = {
log: createCustomLogger('log'),
warn: createCustomLogger('warn'),
- error: createCustomLogger('error'),
+ error: createCustomLogger('error')
};
console.log('Paramedic console has been installed.');
};
Paramedic.prototype.injectJasmineReporter = function () {
- var JasmineParamedicProxy =
require('cordova-plugin-paramedic.JasmineParamedicProxy');
- var jasmineProxy = new JasmineParamedicProxy(this.socket);
- var testsModule =
cordova.require("cordova-plugin-test-framework.cdvtests");
- var defineAutoTestsOriginal = testsModule.defineAutoTests;
+ const JasmineParamedicProxy =
require('cordova-plugin-paramedic.JasmineParamedicProxy');
+ const jasmineProxy = new JasmineParamedicProxy(this.socket);
+ const testsModule =
cordova.require('cordova-plugin-test-framework.cdvtests');
+ const defineAutoTestsOriginal = testsModule.defineAutoTests;
testsModule.defineAutoTests = function () {
defineAutoTestsOriginal();
@@ -105,13 +104,12 @@ Paramedic.prototype.injectJasmineReporter = function () {
Paramedic.prototype.loadParamedicServerUrl = function () {
try {
// attempt to synchronously load medic config
- var xhr = new XMLHttpRequest();
- xhr.open("GET", "../medic.json", false);
+ const xhr = new XMLHttpRequest();
+ xhr.open('GET', '../medic.json', false);
xhr.send(null);
- var cfg = JSON.parse(xhr.responseText);
+ const cfg = JSON.parse(xhr.responseText);
return cfg.logurl || PARAMEDIC_SERVER_DEFAULT_URL;
-
} catch (ex) {
console.log('Unable to load paramedic server url: ' + ex);
}
@@ -119,7 +117,6 @@ Paramedic.prototype.loadParamedicServerUrl = function () {
return PARAMEDIC_SERVER_DEFAULT_URL;
};
-
Paramedic.prototype.loadParamedicServerUrl = function () {
return getMedicConfig().logurl;
};
@@ -128,16 +125,16 @@ cordova.paramedic = new Paramedic();
cordova.paramedic.initialize();
function getMedicConfig () {
- var cfg = {
+ const cfg = {
logurl: PARAMEDIC_SERVER_DEFAULT_URL
};
try {
// attempt to synchronously load medic config
- var xhr = new XMLHttpRequest();
- xhr.open("GET", "../medic.json", false);
+ const xhr = new XMLHttpRequest();
+ xhr.open('GET', '../medic.json', false);
xhr.send(null);
- var parsedCfg = JSON.parse(xhr.responseText);
+ const parsedCfg = JSON.parse(xhr.responseText);
if (parsedCfg.logurl) {
cfg.logurl = parsedCfg.logurl;
}
diff --git a/paramedic-plugin/plugin.xml b/paramedic-plugin/plugin.xml
index 08b078d..c3edfb5 100644
--- a/paramedic-plugin/plugin.xml
+++ b/paramedic-plugin/plugin.xml
@@ -1,31 +1,32 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
- 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.
+#
+# 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.
+#
-->
-
<plugin xmlns="http://apache.org/cordova/ns/plugins/1.0"
- xmlns:android="http://schemas.android.com/apk/res/android"
- id="cordova-plugin-paramedic"
- version="1.2.1-dev">
+ xmlns:android="http://schemas.android.com/apk/res/android"
+ id="cordova-plugin-paramedic"
+ version="2.0.0-dev">
<name>Paramedic</name>
<description>Cordova Paramedic Plugin</description>
- <license>Apache 2.0</license>
+ <license>Apache-2.0</license>
<js-module src="JasmineParamedicProxy.js" name="JasmineParamedicProxy" />
diff --git a/sample-config/.paramedic.config.js
b/sample-config/.paramedic.config.js
index c040c3c..2f57f84 100644
--- a/sample-config/.paramedic.config.js
+++ b/sample-config/.paramedic.config.js
@@ -7,7 +7,7 @@
"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
+ 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
@@ -18,11 +18,9 @@
*/
module.exports = {
- "verbose": false,
- "plugins": [
- "https://github.com/apache/cordova-plugin-inappbrowser"
- ],
- "platform": "android",
- "action": "run",
- "args": ""
+ verbose: false,
+ plugins: ['https://github.com/apache/cordova-plugin-inappbrowser'],
+ platform: 'android',
+ action: 'run',
+ args: ''
};
diff --git a/spec/testable-plugin/package.json
b/spec/testable-plugin/package.json
index 47e54fb..1bb9395 100644
--- a/spec/testable-plugin/package.json
+++ b/spec/testable-plugin/package.json
@@ -1,6 +1,7 @@
{
"name": "testable-plugin",
"version": "1.0.0",
+ "private": true,
"description": "",
"main": "index.js",
"directories": {
@@ -9,6 +10,6 @@
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1"
},
- "author": "",
- "license": ""
+ "author": "Apache Software Foundation",
+ "license": "Apache-2.0"
}
diff --git a/spec/testable-plugin/plugin.xml b/spec/testable-plugin/plugin.xml
index af0c373..33fbd7e 100644
--- a/spec/testable-plugin/plugin.xml
+++ b/spec/testable-plugin/plugin.xml
@@ -1,40 +1,38 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
- 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.
+#
+# 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.
+#
-->
-
<plugin xmlns="http://apache.org/cordova/ns/plugins/1.0"
- xmlns:rim="http://www.blackberry.com/ns/widgets"
xmlns:android="http://schemas.android.com/apk/res/android"
id="testable-plugin"
- version="0.0.1">
+ version="2.0.0-dev">
+
<name>Testable Plugin</name>
<description>Cordova Testing Plugin</description>
- <license>Apache 2.0</license>
+ <license>Apache-2.0</license>
<keywords>cordova</keywords>
- <repo></repo>
- <issue></issue>
<js-module src="www/testable.js" name="testable">
<clobbers target="testable" />
</js-module>
- <!-- ios -->
<platform name="ios"/>
<platform name="android"/>
</plugin>
diff --git a/spec/testable-plugin/tests/foo/package.json
b/spec/testable-plugin/tests/foo/package.json
index b2264bf..2e13aa2 100644
--- a/spec/testable-plugin/tests/foo/package.json
+++ b/spec/testable-plugin/tests/foo/package.json
@@ -1,10 +1,11 @@
{
"name": "testable-plugin-tests-foo",
"version": "1.0.0",
+ "private": true,
"description": "Additional tests for testable plugin",
"scripts": {
"test": "echo \"Here could be additional tests.\""
},
- "author": "",
- "license": ""
+ "author": "Apache Software Foundation",
+ "license": "Apache-2.0"
}
diff --git a/spec/testable-plugin/tests/package.json
b/spec/testable-plugin/tests/package.json
index 760fdce..f52a2c0 100644
--- a/spec/testable-plugin/tests/package.json
+++ b/spec/testable-plugin/tests/package.json
@@ -1,11 +1,8 @@
{
"name": "tests",
"version": "1.0.0",
+ "private": true,
"description": "",
- "main": "tests.js",
- "scripts": {
- "test": "echo \"Error: no test specified\" && exit 1"
- },
- "author": "",
- "license": ""
+ "author": "Apache Software Foundation",
+ "license": "Apache-2.0"
}
diff --git a/spec/testable-plugin/tests/plugin.xml
b/spec/testable-plugin/tests/plugin.xml
index 977d993..a770e53 100644
--- a/spec/testable-plugin/tests/plugin.xml
+++ b/spec/testable-plugin/tests/plugin.xml
@@ -1,30 +1,33 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
- 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.
+#
+# 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.
+#
-->
-
<plugin xmlns="http://apache.org/cordova/ns/plugins/1.0"
xmlns:rim="http://www.blackberry.com/ns/widgets"
xmlns:android="http://schemas.android.com/apk/res/android"
id="org.apache.cordova.testable.tests"
- version="0.0.1">
+ version="2.0.0-dev">
+
<name>Cordova Testable Plugin Tests</name>
- <license>Apache 2.0</license>
+ <license>Apache-2.0</license>
+
<js-module src="tests.js" name="tests">
</js-module>
</plugin>
diff --git a/spec/testable-plugin/tests/tests.js
b/spec/testable-plugin/tests/tests.js
index f9a2ee7..48fc9c6 100644
--- a/spec/testable-plugin/tests/tests.js
+++ b/spec/testable-plugin/tests/tests.js
@@ -1,41 +1,38 @@
-/*
- *
- * 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.
- *
-*/
+/**
+ 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
-exports.defineAutoTests = function() {
- describe('Testable', function () {
+ http://www.apache.org/licenses/LICENSE-2.0
- it("should pass a test", function() {
- expect(window).toBeDefined();
- });
+ 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.
+*/
- it("should exist", function() {
- expect(window.testable).toBeDefined();
- });
+/* global describe, it, expect, window */
- it("should be self aware",function() {
- expect(window.testable.doYouExist).toEqual("fuckYeah");
- })
+exports.defineAutoTests = function () {
+ describe('Testable', function () {
+ it('should pass a test', () => {
+ expect(window).toBeDefined();
+ });
- });
-};
+ it('should exist', () => {
+ expect(window.testable).toBeDefined();
+ });
-exports.defineManualTests = function(){};
+ it('should be self aware', () => {
+ expect(window.testable.doYouExist).toEqual('IDoExist');
+ });
+ });
+};
+exports.defineManualTests = function () {};
diff --git a/spec/testable-plugin/www/testable.js
b/spec/testable-plugin/www/testable.js
index 6299ed6..4585d33 100644
--- a/spec/testable-plugin/www/testable.js
+++ b/spec/testable-plugin/www/testable.js
@@ -1,23 +1,20 @@
-/*
- *
- * 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.
- *
-*/
+/**
+ 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.
+*/
-module.exports = {'doYouExist':'fuckYeah'};
\ No newline at end of file
+module.exports = { doYouExist: 'IDoExist' };
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]