Skip to content

Commit

Permalink
fix: improve test-worker.js to assert promise results are correct
Browse files Browse the repository at this point in the history
Also hush some console messages, and test the local worker as well (for
parallelism).

closes Agoric#1778
  • Loading branch information
warner authored and dckc committed Jan 21, 2021
1 parent 99d15a4 commit c72cfd6
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions packages/SwingSet/test/workers/test-worker.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,21 +23,17 @@ test('local vat manager', async t => {
const c = await makeController('local');
t.teardown(c.shutdown);

console.log('@@ready to run...');
await c.run();
t.is(c.kpStatus(c.bootstrapResult), 'fulfilled');
t.deepEqual(c.dump().log, ['testLog works']);
t.deepEqual(JSON.parse(c.kpResolution(c.bootstrapResult).body), expected);
});

// The XS worker is disabled until the xsnap-based approach is ready for
// testing. Unlike the old approach, I think we'll build xsnap
// unconditionally, so we won't need the old 'maybeTestXS' conditional.

test('xs vat manager', async t => {
const c = await makeController('xs-worker');
t.teardown(c.shutdown);

console.log('@@ready to run...');
await c.run();
t.is(c.kpStatus(c.bootstrapResult), 'fulfilled');
t.deepEqual(c.dump().log, ['testLog works']);
Expand Down

0 comments on commit c72cfd6

Please sign in to comment.