diff --git a/packages/integration-tests/src/helpers/index.ts b/packages/integration-tests/src/helpers/index.ts index 4b49ad97c..e4f35441c 100644 --- a/packages/integration-tests/src/helpers/index.ts +++ b/packages/integration-tests/src/helpers/index.ts @@ -2,13 +2,14 @@ import fs from 'fs/promises'; import { createServer } from 'http'; import path from 'path'; +import { mockSmsVerificationCodeFileName } from '@logto/connector-kit'; import type { User } from '@logto/schemas'; import { RequestError } from 'got'; import { createUser } from '#src/api/index.js'; import { generateUsername } from '#src/utils.js'; -const temporaryVerificationCodeFilePath = path.join('/tmp', 'logto_mock_passcode_record.txt'); +const temporaryVerificationCodeFilePath = path.join('/tmp', mockSmsVerificationCodeFileName); export const createUserByAdmin = ( username?: string, diff --git a/packages/toolkit/connector-kit/src/index.ts b/packages/toolkit/connector-kit/src/index.ts index 4807dfba3..3abaaa1b1 100644 --- a/packages/toolkit/connector-kit/src/index.ts +++ b/packages/toolkit/connector-kit/src/index.ts @@ -24,3 +24,5 @@ export const parseJson = ( throw new ConnectorError(errorCode, errorPayload ?? jsonString); } }; + +export const mockSmsVerificationCodeFileName = 'logto_mock_verification_code_record.txt';