From c07e88c7fb28308580a0ba8971cf6d7ddf26f0b7 Mon Sep 17 00:00:00 2001 From: Kris Kowal Date: Thu, 28 Apr 2022 14:10:19 -0700 Subject: [PATCH] fix: style change --- packages/publish-bundle/index.js | 2 +- packages/publish-bundle/node-powers.js | 4 ++-- packages/publish-bundle/test/test-publish.js | 16 ++++++++-------- 3 files changed, 11 insertions(+), 11 deletions(-) diff --git a/packages/publish-bundle/index.js b/packages/publish-bundle/index.js index 913d6adec64b..2dac213dda02 100644 --- a/packages/publish-bundle/index.js +++ b/packages/publish-bundle/index.js @@ -221,7 +221,7 @@ const publishBundle = async ( * @param {(bundle: unknown, connectionSpec: unknown) => Promise} [powers.publishBundleCosmos] * @param {() => unknown} [powers.getDefaultConnection] */ -export const makeBundlePublisher = powers => { +export const makeBundlePublisher = (powers) => { /** * @param {unknown} bundle * @param {unknown} connectionSpec diff --git a/packages/publish-bundle/node-powers.js b/packages/publish-bundle/node-powers.js index c5edaeb80cd6..57e9b0277ce3 100644 --- a/packages/publish-bundle/node-powers.js +++ b/packages/publish-bundle/node-powers.js @@ -39,7 +39,7 @@ export const makeJsonHttpClient = ({ http }) => { 'Content-Length': `${requestLength}`, }, }, - response => { + (response) => { (async () => { const chunks = []; for await (const chunk of response) { @@ -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, diff --git a/packages/publish-bundle/test/test-publish.js b/packages/publish-bundle/test/test-publish.js index f9c8413d4408..41e5f8a31c8c 100644 --- a/packages/publish-bundle/test/test-publish.js +++ b/packages/publish-bundle/test/test-publish.js @@ -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'; @@ -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(); @@ -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(); @@ -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(); @@ -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'; @@ -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({ @@ -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)); });