Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

robotremote

Package Overview
Dependencies
Maintainers
1
Versions
25
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

robotremote - npm Package Compare versions

Comparing version 1.0.0 to 1.0.1

example/remote_tests.robot

2

package.json

@@ -17,3 +17,3 @@ {

],
"version": "1.0.0",
"version": "1.0.1",
"preferGlobal": false,

@@ -20,0 +20,0 @@ "homepage": "https://github.com/comick/node-robotremoteserver",

@@ -85,3 +85,3 @@ # robotremote

remote_tests.txt:
remote_tests.robot:

@@ -114,3 +114,3 @@ ```

$ pybot example/remote_tests.txt
$ pybot example/remote_tests.robot

@@ -117,0 +117,0 @@ ## Using botclient.js:

@@ -10,6 +10,6 @@ 'use strict';

}
var port = 12345;
function nextPort() {
return ++port;
return nextPort.port++;
}
nextPort.port = 12345;

@@ -27,5 +27,6 @@ describe('Robot Remote Library', function () {

});
it('client should succeed to start if server is running and list all keywords', function (done) {
var server = new robot.Server([testLibrary], {host: 'localhost', port: nextPort(), allowStop: true}, function () {
robot.createClient({host: 'localhost', port: port}).done(
it('client should start and list all keywords when server is running', function (done) {
var serverPort = nextPort();
var server = new robot.Server([testLibrary], {host: 'localhost', port: serverPort, allowStop: true}, function () {
robot.createClient({host: 'localhost', port: serverPort}).done(
function (val) {

@@ -38,3 +39,5 @@ keywordsEqual(val, server.keywords);

});
it('client should call remote keyword', function (done) {
it('keyword should run when called by a client', function (done) {
var serverPort = nextPort();
function testKeyword(p1) {

@@ -47,4 +50,4 @@ done();

];
var server = new robot.Server(libraries, {host: 'localhost', port: nextPort(), allowStop: true}, function () {
robot.createClient({host: 'localhost', port: port}).done(
var server = new robot.Server(libraries, {host: 'localhost', port: serverPort, allowStop: true}, function () {
robot.createClient({host: 'localhost', port: serverPort}).done(
function (clientKeywords) {

@@ -58,2 +61,3 @@ clientKeywords.testKeyword('param').done(function (val) {

it('keyword should output correctly', function (done) {
var serverPort = nextPort();
var lib = {

@@ -69,4 +73,4 @@ testKeyword: function (p1) {

};
var server = new robot.Server([lib], {host: 'localhost', port: nextPort(), allowStop: true}, function () {
robot.createClient({host: 'localhost', port: port}).done(
var server = new robot.Server([lib], {host: 'localhost', port: serverPort, allowStop: true}, function () {
robot.createClient({host: 'localhost', port: serverPort}).done(
function (val) {

@@ -84,3 +88,4 @@ val.testKeyword('param').done(function (res) {

});
it('keyword should output continuable and fatal as for error', function (done) {
it('should output continuable and fatal as for failing keyword error', function (done) {
var serverPort = nextPort();
var lib = {

@@ -94,4 +99,4 @@ testKeyword: function () {

};
var server = new robot.Server([lib], {host: 'localhost', port: nextPort(), allowStop: true}, function () {
robot.createClient({host: 'localhost', port: port}).done(
var server = new robot.Server([lib], {host: 'localhost', port: serverPort, allowStop: true}, function () {
robot.createClient({host: 'localhost', port: serverPort}).done(
function (val) {

@@ -107,3 +112,27 @@ val.testKeyword().done(done, function (err) {

});
it('should load keywords from all libraries', function (done) {
var serverPort = nextPort();
var lib1 = {
testKeywordFromLib1: function () {
return true;
}
};
var lib2 = {
testKeywordFromLib2: function () {
return true;
}
};
var server = new robot.Server([lib1, lib2], {host: 'localhost', port: serverPort, allowStop: true}, function () {
robot.createClient({host: 'localhost', port: serverPort}).done(
function (val) {
val.testKeywordFromLib1().done(function () {
}, done);
val.testKeywordFromLib2().done(function (val) {
done();
}, done);
}, done
);
});
});
});

@@ -41,7 +41,12 @@ 'use strict';

lib.neverReturn = function () {
return new Promise(function (resolve, reject) {
});
};
// Run this keyword library if the library itself is called explicitly.
if (!module.parent) {
var robot = require('../lib/robotremote');
var options = { host: process.argv[2], port: parseInt(process.argv[3], 10), allowStop: true };
var options = { host: process.argv[2], port: parseInt(process.argv[3], 10), timeout: 2000, allowStop: true };
var server = new robot.Server([lib], options);
}
SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc