meteor-desktop-plugin-test-suite
Advanced tools
Comparing version 0.0.15 to 1.0.0
{ | ||
"name": "meteor-desktop-plugin-test-suite", | ||
"version": "0.0.15", | ||
"engines": { | ||
"node": ">=4.0.0" | ||
}, | ||
"description": "Few utils to ease out functional testing of Meteor Desktop plugins.", | ||
"main": "dist/suite.js", | ||
"version": "1.0.0", | ||
"description": "", | ||
"main": "index.js", | ||
"scripts": { | ||
"prepublish": "npm run build", | ||
"build": "babel src --out-dir dist --source-maps inline --copy-files", | ||
"build-watch": "babel src --watch --out-dir dist --source-maps inline --copy-files", | ||
"lint": "eslint src app" | ||
"test": "echo \"Error: no test specified\" && exit 1" | ||
}, | ||
"author": "Bartosz Wojtkowiak <bartosz@wojtkowiak.it>", | ||
"license": "MIT", | ||
"devDependencies": { | ||
"babel-cli": "^6.18.0", | ||
"babel-core": "^6.18.0", | ||
"babel-preset-es2015-node4": "^2.1.0", | ||
"eslint": "^3.8.1", | ||
"eslint-config-airbnb-base": "^9.0.0", | ||
"eslint-plugin-import": "^2.0.1" | ||
}, | ||
"dependencies": { | ||
"semver": "^5.3.0", | ||
"cross-spawn": "^4.0.2", | ||
"shelljs": "^0.7.4" | ||
}, | ||
"repository": { | ||
"type": "git", | ||
"url": "https://github.com/wojtkowiak/meteor-desktop-plugin-test-suite" | ||
"url": "git+https://github.com/npm/deprecate-holder.git" | ||
}, | ||
"keywords": [ | ||
"electron", | ||
"meteor", | ||
"packager", | ||
"desktop", | ||
"test", | ||
"suite" | ||
], | ||
"author": "", | ||
"license": "ISC", | ||
"bugs": { | ||
"url": "https://github.com/wojtkowiak/meteor-desktop-plugin-test-suite/issues" | ||
"url": "https://github.com/npm/deprecate-holder/issues" | ||
}, | ||
"homepage": "https://github.com/wojtkowiak/meteor-desktop-plugin-test-suite" | ||
"homepage": "https://github.com/npm/deprecate-holder#readme" | ||
} |
101
README.md
@@ -1,100 +0,5 @@ | ||
## Meteor Desktop Plugin Test Suite | ||
# Deprecated Package | ||
Few utils to ease out functional testing of Meteor Desktop plugins. | ||
Take a look at the examples at the bottom of this readme to actually see how you can use this. | ||
This package is no longer supported and has been deprecated. To avoid malicious use, npm is hanging on to the package name. | ||
### `getElectronPath` | ||
Returns path to electron bin. | ||
### `createTestApp(installPath, pluginName)` | ||
Creates a test app with plugin you are testing included. Plugin is installed by `npm`. | ||
```javascript | ||
/** | ||
* @param {string} installPath - path at which to install the app | ||
* @param {string} pluginName - name of the npm package (plugin) you are testing | ||
* @returns {Promise} | ||
*/ | ||
``` | ||
### `constructPlugin(app, log, app, appSettings, eventsBus, modules, settings, Module)` | ||
It is instantiating your plugin. You can supply mocks for any params your plugin would normally receive from the skeleton app. | ||
Pass `undefined` if your plugin does not use certain param or if you want to use some defaults provided by this test suite. Check [here](https://github.com/wojtkowiak/meteor-desktop-plugin-test-suite/blob/master/app/index.js#L89) to see what is passed by default. | ||
### `fireEventsBusEvent(app, eventToFire, ...eventArgs)` | ||
Fires an event on the events bus, so you can simulate for example a system event on which you plugin is listening. | ||
```javascript | ||
/** | ||
* @param {Object} app - app ref from Spectron | ||
* @param {string} eventToFire - name of the event to fire | ||
* @param {...*} eventArgs - arguments to pass with the event | ||
* @returns {Promise} | ||
*/ | ||
``` | ||
### `send(app, module, event, ...args)` | ||
Sends an IPC event to your module. Equivalent of `Desktop.send`. | ||
```javascript | ||
/** | ||
* @param {Object} app - app ref from Spectron | ||
* @param {string} module - module name your plugin is registering | ||
* @param {string} event - event from your module | ||
* @param {...*} args - array of arguments to pass to ipc.send | ||
* @returns {Promise} | ||
*/ | ||
``` | ||
### `fetch(app, module, event, ...args)` | ||
Fetches some data from main process by sending an IPC event and waiting for the response. | ||
Equivalent of `Desktop.fetch`. | ||
```javascript | ||
/** | ||
* @param {Object} app - app ref from Spectron | ||
* @param {string} module - module name your plugin is registering | ||
* @param {string} event - event from your module | ||
* @param {...*} args - array of arguments to pass to ipc.send | ||
* @return {Promise} | ||
*/ | ||
``` | ||
### `fireEventsBusEventAndWaitForAnother(app, eventToFire, eventToListenFor, ...eventArgs)` | ||
Fires an event on the events bus and then waits for an another event to be emitted. Useful for example when your plugin is doing some stuff on `afterLoading` event and signalizes readiness via another event. | ||
```javascript | ||
/** | ||
* @param {Object} app - app ref from Spectron | ||
* @param {string} eventToFire - name of the event to fire | ||
* @param {string} eventToListenFor - event to listen for on the events bus | ||
* @param {...*} eventArgs - arguments to pass with the event | ||
* @return {Promise} | ||
*/ | ||
``` | ||
### `sendIpc(app, ...args)` | ||
Sends an IPC message to the main process. | ||
```javascript | ||
/** | ||
* @param {Object} app - the app ref from Spectron | ||
* @param {...*} args - array of arguments to pass to ipc.send | ||
* @returns {Promise} | ||
*/ | ||
``` | ||
### `sendIpcSync(app, ...args)` | ||
Same as above but sync. However also returns a `Promise` as it is transferred through chromedriver. | ||
### `sendIpcAndWaitForResponse(app, eventToSend, eventToListenFor, ...eventArgs)` | ||
Sends an IPC event and waits for an another IPC event to come. | ||
```javascript | ||
/** | ||
* @param {Object} app - app ref from Spectron | ||
* @param {string} eventToSend - name of the ipc event to send | ||
* @param {string} eventToListenFor - ipc event to listen for | ||
* @param {...*} eventArgs - arguments to pass with the event | ||
* @returns {Promise} | ||
*/ | ||
``` | ||
### `class Logger(show, showErrors)` | ||
Fake logger that eventually can write the logs to the console. You can set `show` to `false` and `showErrors` to `true` to only see errors passed to it. | ||
## Examples | ||
An example of usage in tests is here [meteor-desktop-splash-screen](https://github.com/wojtkowiak/meteor-desktop-splash-screen/blob/master/tests/functional/test.js) and here [meteor-desktop-localstorage](https://github.com/wojtkowiak/meteor-desktop-localstorage/blob/master/tests/functional/test.js). | ||
Please contact support@npmjs.com if you have questions about this package. |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Deprecated
MaintenanceThe maintainer of the package marked it as deprecated. This could indicate that a single version should not be used, or that the package is no longer maintained and any new vulnerabilities will not be fixed.
Found 1 instance in 1 package
Empty package
Supply chain riskPackage does not contain any code. It may be removed, is name squatting, or the result of a faulty package publish.
Found 1 instance in 1 package
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
Found 1 instance in 1 package
No contributors or author data
MaintenancePackage does not specify a list of contributors or an author in package.json.
Found 1 instance in 1 package
No tests
QualityPackage does not have any tests. This is a strong signal of a poorly maintained or low quality package.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Network access
Supply chain riskThis module accesses the network.
Found 1 instance in 1 package
Filesystem access
Supply chain riskAccesses the file system, and could potentially read sensitive data.
Found 1 instance in 1 package
No v1
QualityPackage is not semver >=1. This means it is not stable and does not support ^ ranges.
Found 1 instance in 1 package
0
0
0
695
2
0
2
1
6
3
- Removedcross-spawn@^4.0.2
- Removedsemver@^5.3.0
- Removedshelljs@^0.7.4
- Removedbalanced-match@1.0.2(transitive)
- Removedbrace-expansion@1.1.11(transitive)
- Removedconcat-map@0.0.1(transitive)
- Removedcross-spawn@4.0.2(transitive)
- Removedfs.realpath@1.0.0(transitive)
- Removedfunction-bind@1.1.2(transitive)
- Removedglob@7.2.3(transitive)
- Removedhasown@2.0.2(transitive)
- Removedinflight@1.0.6(transitive)
- Removedinherits@2.0.4(transitive)
- Removedinterpret@1.4.0(transitive)
- Removedis-core-module@2.15.1(transitive)
- Removedisexe@2.0.0(transitive)
- Removedlru-cache@4.1.5(transitive)
- Removedminimatch@3.1.2(transitive)
- Removedonce@1.4.0(transitive)
- Removedpath-is-absolute@1.0.1(transitive)
- Removedpath-parse@1.0.7(transitive)
- Removedpseudomap@1.0.2(transitive)
- Removedrechoir@0.6.2(transitive)
- Removedresolve@1.22.8(transitive)
- Removedsemver@5.7.2(transitive)
- Removedshelljs@0.7.8(transitive)
- Removedsupports-preserve-symlinks-flag@1.0.0(transitive)
- Removedwhich@1.3.1(transitive)
- Removedwrappy@1.0.2(transitive)
- Removedyallist@2.1.2(transitive)