Skip to content

Commit ab0cf7f

Browse files
style(OUT-3546): apply lint fixes to integration test files
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
1 parent a9cb6ad commit ab0cf7f

5 files changed

Lines changed: 9 additions & 17 deletions

File tree

test/helpers/mocks.ts

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -86,10 +86,12 @@ export type MockIntuitAPI = ReturnType<typeof createMockIntuitAPI>
8686
* both sites touch would reflect the sum of both call sites. Same applies to
8787
* IntuitAPI if/when it gets instantiated more than once per request.
8888
*/
89-
export function installMockApis(opts: {
90-
copilot?: MockCopilotAPI
91-
intuit?: MockIntuitAPI
92-
} = {}): { copilot: MockCopilotAPI; intuit: MockIntuitAPI } {
89+
export function installMockApis(
90+
opts: {
91+
copilot?: MockCopilotAPI
92+
intuit?: MockIntuitAPI
93+
} = {},
94+
): { copilot: MockCopilotAPI; intuit: MockIntuitAPI } {
9395
const copilot = opts.copilot ?? createMockCopilotAPI()
9496
const intuit = opts.intuit ?? createMockIntuitAPI()
9597

@@ -99,9 +101,7 @@ export function installMockApis(opts: {
99101
return copilot as unknown as CopilotAPI
100102
} as unknown as typeof CopilotAPI)
101103

102-
vi.mocked(IntuitAPI).mockImplementation(function (
103-
this: unknown,
104-
): IntuitAPI {
104+
vi.mocked(IntuitAPI).mockImplementation(function (this: unknown): IntuitAPI {
105105
return intuit as unknown as IntuitAPI
106106
} as unknown as typeof IntuitAPI)
107107

test/helpers/seed.ts

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,7 @@ import {
44
QBPortalConnection,
55
QBPortalConnectionCreateSchema,
66
} from '@/db/schema/qbPortalConnections'
7-
import {
8-
QBSetting,
9-
QBSettingCreateSchema,
10-
} from '@/db/schema/qbSettings'
7+
import { QBSetting, QBSettingCreateSchema } from '@/db/schema/qbSettings'
118

129
export const TEST_PORTAL_ID = 'test-portal-00000001'
1310
export const TEST_REALM_ID = 'test-realm-123'

test/integration/quickbooks/priceCreated.copilotNotFound.test.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,6 @@ describe('POST /api/quickbooks/webhook — price.created (copilot product 404)',
3030

3131
beforeEach(async () => {
3232
await truncateAllTestTables()
33-
3433
;({ copilot, intuit } = installMockApis({
3534
copilot: createMockCopilotAPI({
3635
// Real CopilotAPI.getProduct returns undefined when the product

test/integration/quickbooks/priceCreated.multiPrice.test.ts

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,10 +9,7 @@ import * as appHandler from '@/app/api/quickbooks/webhook/route'
99
import priceCreatedPayload from '../../fixtures/priceCreated.webhook.json'
1010
import { truncateAllTestTables } from '../../helpers/testDb'
1111
import { seedHealthyPortal, TEST_PORTAL_ID } from '../../helpers/seed'
12-
import {
13-
installMockApis,
14-
type MockIntuitAPI,
15-
} from '../../helpers/mocks'
12+
import { installMockApis, type MockIntuitAPI } from '../../helpers/mocks'
1613

1714
/**
1815
* Multi-price: when a product already has a price mapped to QB, a new price

test/integration/quickbooks/priceCreated.qbFailure.test.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,6 @@ describe('POST /api/quickbooks/webhook — price.created (QB createItem fails)',
3030

3131
beforeEach(async () => {
3232
await truncateAllTestTables()
33-
3433
;({ copilot, intuit } = installMockApis({
3534
intuit: createMockIntuitAPI({
3635
createItem: vi

0 commit comments

Comments
 (0)