Skip to content

Commit db13468

Browse files
committed
Apply linting fixes to test files
1 parent d5f4659 commit db13468

File tree

6 files changed

+17
-10
lines changed

6 files changed

+17
-10
lines changed

src/commands/fix/handle-fix.test.mts

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -98,10 +98,9 @@ describe('convertIdsToGhsas', () => {
9898
data: 'GHSA-1234-5678-9abc',
9999
})
100100

101-
const result = await convertIdsToGhsas(
102-
['CVE-invalid', 'CVE-2021-12345'],
103-
{ outputKind: 'text' },
104-
)
101+
const result = await convertIdsToGhsas(['CVE-invalid', 'CVE-2021-12345'], {
102+
outputKind: 'text',
103+
})
105104

106105
expect(result).toEqual(['GHSA-1234-5678-9abc'])
107106
expect(logger.warn).toHaveBeenCalledWith(

src/commands/npm/cmd-npm.test.mts

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -160,9 +160,10 @@ describe('socket npm', async () => {
160160
async cmd => {
161161
const { code } = await spawnSocketCli(binCliPath, cmd, { cwd: testCwd })
162162
// npm exec can exit with 0 or 1 depending on whether the package is cached
163-
expect(code, 'dry-run exec should exit with code 0 or 1').toBeGreaterThanOrEqual(
164-
0,
165-
)
163+
expect(
164+
code,
165+
'dry-run exec should exit with code 0 or 1',
166+
).toBeGreaterThanOrEqual(0)
166167
expect(code).toBeLessThanOrEqual(1)
167168
},
168169
)

src/commands/organization/cmd-organization-policy.test.mts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,9 @@ describe('socket organization list', async () => {
6161
'should support --dry-run',
6262
async cmd => {
6363
const { code, stderr, stdout } = await spawnSocketCli(binCliPath, cmd)
64-
expect(stdout).toMatchInlineSnapshot(`"[DryRun]: No-op, call a sub-command; ok"`)
64+
expect(stdout).toMatchInlineSnapshot(
65+
`"[DryRun]: No-op, call a sub-command; ok"`,
66+
)
6567
expect(`\n ${stderr}`).toMatchInlineSnapshot(`
6668
"
6769
\\u203c Build/test mode mismatch! Built without VITEST=1 but running in test mode.

src/commands/organization/cmd-organization.test.mts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,9 @@ describe('socket organization', async () => {
5757
'should be ok with org name and id',
5858
async cmd => {
5959
const { code, stderr, stdout } = await spawnSocketCli(binCliPath, cmd)
60-
expect(stdout).toMatchInlineSnapshot(`"[DryRun]: No-op, call a sub-command; ok"`)
60+
expect(stdout).toMatchInlineSnapshot(
61+
`"[DryRun]: No-op, call a sub-command; ok"`,
62+
)
6163
expect(`\n ${stderr}`).toMatchInlineSnapshot(`
6264
"
6365
\\u203c Build/test mode mismatch! Built without VITEST=1 but running in test mode.

src/commands/scan/cmd-scan.test.mts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,9 @@ describe('socket scan', async () => {
6060
'should require args with just dry-run',
6161
async cmd => {
6262
const { code, stderr, stdout } = await spawnSocketCli(binCliPath, cmd)
63-
expect(stdout).toMatchInlineSnapshot(`"[DryRun]: No-op, call a sub-command; ok"`)
63+
expect(stdout).toMatchInlineSnapshot(
64+
`"[DryRun]: No-op, call a sub-command; ok"`,
65+
)
6466
expect(`\n ${stderr}`).toMatchInlineSnapshot(`
6567
"
6668
\\u203c Build/test mode mismatch! Built without VITEST=1 but running in test mode.

src/utils/http.test.mts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ vi.mock('node:https', () => ({
1515
}))
1616

1717
import { httpGetJson, httpGetText, httpRequest } from './http.mts'
18+
1819
import http from 'node:http'
1920
import https from 'node:https'
2021

0 commit comments

Comments
 (0)