Skip to content

Commit

Permalink
test: exercise testLog in test-worker.js
Browse files Browse the repository at this point in the history
  • Loading branch information
warner committed Sep 21, 2020
1 parent 29bc81a commit 49605c6
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
3 changes: 3 additions & 0 deletions packages/SwingSet/test/workers/test-worker.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ maybeTestXS('xs vat manager', async t => {

await c.run();
t.is(c.bootstrapResult.status(), 'fulfilled');
t.deepEqual(c.dump().log, ['testLog works']);

await c.shutdown();
});
Expand All @@ -28,6 +29,7 @@ test.skip('nodeWorker vat manager', async t => {

await c.run();
t.is(c.bootstrapResult.status(), 'fulfilled');
t.deepEqual(c.dump().log, ['testLog works']);

await c.shutdown();
});
Expand All @@ -40,6 +42,7 @@ test('node-subprocess vat manager', async t => {
await c.run();
t.is(c.bootstrapResult.status(), 'fulfilled');
t.deepEqual(c.dump().log, ['testLog works']);
await c.shutdown();
});
Expand Down
5 changes: 4 additions & 1 deletion packages/SwingSet/test/workers/vat-target.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,11 @@ function ignore(p) {
// inbound events ('dispatch'), which will provoke a set of outbound events
// ('syscall'), that cover the full range of the dispatch/syscall interface

export function buildRootObject() {
export function buildRootObject(vatPowers) {
console.log(`vat does buildRootObject`); // make sure console works
// note: XS doesn't appear to print console.log unless an exception happens
vatPowers.testLog('testLog works');

const precB = makePromiseKit();
const precC = makePromiseKit();
let callbackObj;
Expand Down

0 comments on commit 49605c6

Please sign in to comment.