Skip to content

Commit

Permalink
chore(casting): Fix parameter types for fake RPC server
Browse files Browse the repository at this point in the history
  • Loading branch information
gibson042 committed Aug 12, 2022
1 parent c2c1da7 commit 9e0c044
Showing 1 changed file with 8 additions and 5 deletions.
13 changes: 8 additions & 5 deletions packages/casting/test/fake-rpc-server.js
Original file line number Diff line number Diff line change
Expand Up @@ -64,8 +64,9 @@ const fakeStatusResult = {
},
};

/** @typedef {Partial<import('ava').ExecutionContext<{cleanups: Array<() => void>}>> & {context}} fakeServerTestContext */
/**
* @param {Assertions} t
* @param {fakeServerTestContext} t
* @param {Array<{any}>} fakeValues
* @param {object} [options]
* @param {Marshaller} [options.marshaller]
Expand Down Expand Up @@ -249,10 +250,12 @@ export const develop = async () => {
unserialize({ body: jsonMarshalled, slots: [] }),
),
);
const mockT = {
log: console.log,
context: { cleanups: [] },
};
const mockT = /** @type {fakeServerTestContext} */ (
/** @type {unknown} */ ({
log: console.log,
context: { cleanups: [] },
})
);
const PORT = await startFakeServer(mockT, [...fakeValues]);
console.log(
`Try this in another terminal:
Expand Down

0 comments on commit 9e0c044

Please sign in to comment.