Skip to content

Commit 92cc03a

Browse files
committed
chore(lint): format tests with biome and lint the tests dir
The lint script only formatted src/, so test files drifted from biome's style and CI's `biome check src tests` failed. Format them and add tests/ to the lint script so local matches CI.
1 parent a39fba2 commit 92cc03a

4 files changed

Lines changed: 6 additions & 8 deletions

File tree

cli/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121
"prepublishOnly": "rm -rf dist && tsc && cp ../README.md ../LICENSE . && cp -r ../skills .",
2222
"postpublish": "rm -f README.md LICENSE && rm -rf skills",
2323
"test": "bun test",
24-
"lint": "tsc --noEmit && biome check --fix src/"
24+
"lint": "tsc --noEmit && biome check --fix src/ tests/"
2525
},
2626
"keywords": [
2727
"filecoin",

cli/tests/command-mocks.ts

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -389,9 +389,7 @@ export function resetCommandMocks() {
389389
fetchProviderSelectionInput.mockImplementation(
390390
async () => fakeProviderSelectionInput
391391
)
392-
fetchMock.mockImplementation(
393-
async () => new Response(null, { status: 200 })
394-
)
392+
fetchMock.mockImplementation(async () => new Response(null, { status: 200 }))
395393
getPdpDataSets.mockImplementation(async () => [fakeDataSet])
396394
getPdpDataSet.mockImplementation(async () => fakeDataSet)
397395
getPiecesWithMetadata.mockImplementation(async () => ({

cli/tests/output.test.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,9 @@ describe('OutputContext', () => {
4848
error: {
4949
code: opts.code,
5050
message: opts.message,
51-
...(opts.retryable !== undefined ? { retryable: opts.retryable } : {}),
51+
...(opts.retryable !== undefined
52+
? { retryable: opts.retryable }
53+
: {}),
5254
},
5355
...(opts.cta ? { cta: opts.cta } : {}),
5456
}),

cli/tests/synapse-commands.test.ts

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -70,9 +70,7 @@ const { listCommand: pieceListCommand } = await import(
7070
const { removeCommand: pieceRemoveCommand } = await import(
7171
'../src/commands/piece/remove.ts'
7272
)
73-
const { selectHealthyProviders } = await import(
74-
'../src/provider-selection.ts'
75-
)
73+
const { selectHealthyProviders } = await import('../src/provider-selection.ts')
7674
const { synapseClient } = await import('../src/synapse.ts')
7775

7876
const tempDirs: string[] = []

0 commit comments

Comments
 (0)