Skip to content

Commit

Permalink
feat(E): . another test added.
Browse files Browse the repository at this point in the history
  • Loading branch information
zarutian authored Oct 13, 2020
1 parent f00d530 commit 162c0d7
Showing 1 changed file with 23 additions and 0 deletions.
23 changes: 23 additions & 0 deletions packages/eventual-send/test/test-e.js
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,29 @@ test('E call missing method', async t => {
});
});

test('E sendOnly call missing method', async t => {
let testDecrDoneResolve;
const testDecrDone = new Promise(resolve => {
testDecrDoneResolve = resolve;
});

let count = 279;
count counter = {
incr(n) {
count += n;
testDecrDoneResolve(); // only here for the test
return count;
},
};

t.asyncThrow(() => {
E.sendOnly(counter).decr(210);
await testDecrDone;
}, {
message: 'target has no method "decr", has [incr]',
});
});

test('E call undefined method', async t => {
const x = {
double(n) {
Expand Down

0 comments on commit 162c0d7

Please sign in to comment.