Skip to content

Commit

Permalink
fix: style change
Browse files Browse the repository at this point in the history
  • Loading branch information
kriskowal committed Apr 28, 2022
1 parent 52a573b commit c07e88c
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 11 deletions.
2 changes: 1 addition & 1 deletion packages/publish-bundle/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -221,7 +221,7 @@ const publishBundle = async (
* @param {(bundle: unknown, connectionSpec: unknown) => Promise<void>} [powers.publishBundleCosmos]
* @param {() => unknown} [powers.getDefaultConnection]
*/
export const makeBundlePublisher = powers => {
export const makeBundlePublisher = (powers) => {
/**
* @param {unknown} bundle
* @param {unknown} connectionSpec
Expand Down
4 changes: 2 additions & 2 deletions packages/publish-bundle/node-powers.js
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ export const makeJsonHttpClient = ({ http }) => {
'Content-Length': `${requestLength}`,
},
},
response => {
(response) => {
(async () => {
const chunks = [];
for await (const chunk of response) {
Expand All @@ -53,7 +53,7 @@ export const makeJsonHttpClient = ({ http }) => {
// May throw: becomes rejection below.
const responseBody = JSON.parse(responseText);
resolve(responseBody);
})().catch(cause => {
})().catch((cause) => {
reject(
new Error(`JSON HTTP RPC failed with error: ${cause.message}`, {
cause,
Expand Down
16 changes: 8 additions & 8 deletions packages/publish-bundle/test/test-publish.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ const bundle = {
'55555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555',
};

test('fake publish bundle ok', async t => {
test('fake publish bundle ok', async (t) => {
const publishBundle = makeBundlePublisher({
async getAccessToken() {
return 'TO KEN';
Expand All @@ -43,7 +43,7 @@ test('fake publish bundle ok', async t => {
});
});

test('fake publish bundle not ok invalid connection type', async t => {
test('fake publish bundle not ok invalid connection type', async (t) => {
const publishBundle = makeBundlePublisher({
async getAccessToken() {
t.fail();
Expand All @@ -61,7 +61,7 @@ test('fake publish bundle not ok invalid connection type', async t => {
);
});

test('fake publish bundle not ok invalid HTTP connection spec non-string host', async t => {
test('fake publish bundle not ok invalid HTTP connection spec non-string host', async (t) => {
const publishBundle = makeBundlePublisher({
async getAccessToken() {
t.fail();
Expand All @@ -81,7 +81,7 @@ test('fake publish bundle not ok invalid HTTP connection spec non-string host',
);
});

test('fake publish bundle not ok invalid HTTP connection spec non-integer port', async t => {
test('fake publish bundle not ok invalid HTTP connection spec non-integer port', async (t) => {
const publishBundle = makeBundlePublisher({
async getAccessToken() {
t.fail();
Expand All @@ -101,7 +101,7 @@ test('fake publish bundle not ok invalid HTTP connection spec non-integer port',
);
});

test('fake publish bundle not ok response', async t => {
test('fake publish bundle not ok response', async (t) => {
const publishBundle = makeBundlePublisher({
async getAccessToken() {
return 'TOKEN';
Expand All @@ -123,7 +123,7 @@ test('fake publish bundle not ok response', async t => {
);
});

test('publish bundle with fake HTTP server ok', async t => {
test('publish bundle with fake HTTP server ok', async (t) => {
const jsonHttpCall = makeJsonHttpClient({ http });

const publishBundle = makeBundlePublisher({
Expand All @@ -144,12 +144,12 @@ test('publish bundle with fake HTTP server ok', async t => {
const request = JSON.parse(requestText);
t.deepEqual(bundle, request);
res.end('{"ok": true}');
})().catch(error => {
})().catch((error) => {
t.fail(error);
});
});

await new Promise(resolve => {
await new Promise((resolve) => {
server.listen(0, () => resolve(undefined));
});

Expand Down

0 comments on commit c07e88c

Please sign in to comment.