Skip to content

Commit

Permalink
fix(xsnap): more fixes in response to PR review
Browse files Browse the repository at this point in the history
  • Loading branch information
siarhei-agoric committed Sep 20, 2024
1 parent cf63525 commit 904eba6
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion packages/xsnap/src/xsnap.js
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ const decoder = new TextDecoder();

const COMMAND_BUF = encoder.encode('?');
const QUERY = '?'.charCodeAt(0);
const QUERY_RESPONSE_BUF = encoder.encode('/');
export const QUERY_RESPONSE_BUF = encoder.encode('/');
const OK = '.'.charCodeAt(0);
const ERROR = '!'.charCodeAt(0);

Expand Down
4 changes: 2 additions & 2 deletions packages/xsnap/test/xsnap-eof.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import { makeNetstringWriter } from '@endo/netstring';
import { makeNodeWriter } from '@endo/stream-node';
import { makePromiseKit } from '@endo/promise-kit';
import { options } from './message-tools.js';
import { xsnap } from '../src/xsnap.js';
import { xsnap, QUERY_RESPONSE_BUF } from '../src/xsnap.js';

test('xsnap-worker complains while waiting for answer when parent is killed', async t => {
const exitedPKit = makePromiseKit();
Expand Down Expand Up @@ -152,7 +152,7 @@ test('xsnap-worker complains while trying to WRITE when pipes are closed', async
// attempt to write out return value from its own "handleCommand()"
// into a pipe which we've just closed above.
await makeNetstringWriter(makeNodeWriter(worker.toXsnap)).next([
new TextEncoder().encode('/') /* QUERY_RESPONSE_BUF */,
QUERY_RESPONSE_BUF,
new Uint8Array(),
]);
worker.toXsnap.end();
Expand Down

0 comments on commit 904eba6

Please sign in to comment.