feat(sdk,client): add menu to help navigation between apps
All checks were successful
arcad/edge/pipeline/head This commit looks good
All checks were successful
arcad/edge/pipeline/head This commit looks good
This commit is contained in:
@ -1,17 +1,17 @@
|
||||
describe('Remote Procedure Call', function () {
|
||||
|
||||
before(() => {
|
||||
return Edge.connect();
|
||||
return Edge.Client.connect();
|
||||
});
|
||||
|
||||
after(() => {
|
||||
Edge.disconnect();
|
||||
Edge.Client.disconnect();
|
||||
});
|
||||
|
||||
it('should call the remote echo() method and resolve the returned value', function () {
|
||||
const foo = "bar";
|
||||
|
||||
return Edge.rpc('echo', { foo })
|
||||
return Edge.Client.rpc('echo', { foo })
|
||||
.then(result => {
|
||||
console.log(result);
|
||||
chai.assert.equal(result.foo, foo);
|
||||
@ -19,7 +19,7 @@ describe('Remote Procedure Call', function () {
|
||||
});
|
||||
|
||||
it('should call the remote throwErrorFromClient() method and reject with an error', function () {
|
||||
return Edge.rpc('throwErrorFromClient')
|
||||
return Edge.Client.rpc('throwErrorFromClient')
|
||||
.catch(err => {
|
||||
// Assert that it's an "internal" error
|
||||
// See https://www.jsonrpc.org/specification#error_object
|
||||
@ -28,7 +28,7 @@ describe('Remote Procedure Call', function () {
|
||||
});
|
||||
|
||||
it('should call an unregistered method and reject with an error', function () {
|
||||
return Edge.rpc('unregisteredMethod')
|
||||
return Edge.Client.rpc('unregisteredMethod')
|
||||
.catch(err => {
|
||||
// Assert that it's an "method not found" error
|
||||
// See https://www.jsonrpc.org/specification#error_object
|
||||
@ -44,11 +44,11 @@ describe('Remote Procedure Call', function () {
|
||||
for (let i = 0; i <= 1000; i++) {
|
||||
values.push((Math.random() * 1000 | 0));
|
||||
}
|
||||
return Edge.rpc('reset')
|
||||
return Edge.Client.rpc('reset')
|
||||
.then(() => {
|
||||
return Promise.all(values.map(v => Edge.rpc("add", { value: v })));
|
||||
return Promise.all(values.map(v => Edge.Client.rpc("add", { value: v })));
|
||||
})
|
||||
.then(() => Edge.rpc('total'))
|
||||
.then(() => Edge.Client.rpc('total'))
|
||||
.then(remoteTotal => {
|
||||
const localTotal = values.reduce((t, v) => t + v);
|
||||
console.log("Remote total:", remoteTotal, "Local total:", localTotal);
|
||||
|
Reference in New Issue
Block a user