Skip to content

Commit e9502d0

Browse files
committed
✅ Remove hard-coded leadAccountId
1 parent e8b9c63 commit e9502d0

File tree

2 files changed

+5
-1
lines changed

2 files changed

+5
-1
lines changed

tests/integration/utils/createSoftwareProject.ts

+4-1
Original file line numberDiff line numberDiff line change
@@ -4,12 +4,15 @@ import { getVersion2Client } from './getClient.js';
44

55
export const createSoftwareProject = async () => {
66
const client = getVersion2Client();
7+
const currentUser = await client.myself.getCurrentUser();
8+
9+
if (!currentUser.accountId) throw new Error("Couldn't get the current user's account ID", { cause: { currentUser } });
710

811
return client.projects
912
.createProject({
1013
key: Constants.testProjectKey,
1114
name: Constants.testProjectName,
12-
leadAccountId: '5b6d7f20e6dba529eefdbad9',
15+
leadAccountId: currentUser.accountId,
1316
projectTypeKey: 'software',
1417
})
1518
.catch((error: AxiosError) => {

vitest.config.ts

+1
Original file line numberDiff line numberDiff line change
@@ -6,5 +6,6 @@ export default defineConfig({
66
enabled: true,
77
tsconfig: 'tsconfig.lint.json',
88
},
9+
setupFiles: ['dotenv/config'],
910
},
1011
});

0 commit comments

Comments
 (0)