Skip to content

Commit

Permalink
✅ Remove hard-coded leadAccountId
Browse files Browse the repository at this point in the history
  • Loading branch information
NatoBoram committed May 24, 2024
1 parent e8b9c63 commit e9502d0
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
5 changes: 4 additions & 1 deletion tests/integration/utils/createSoftwareProject.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,15 @@ import { getVersion2Client } from './getClient.js';

export const createSoftwareProject = async () => {
const client = getVersion2Client();
const currentUser = await client.myself.getCurrentUser();

if (!currentUser.accountId) throw new Error("Couldn't get the current user's account ID", { cause: { currentUser } });

return client.projects
.createProject({
key: Constants.testProjectKey,
name: Constants.testProjectName,
leadAccountId: '5b6d7f20e6dba529eefdbad9',
leadAccountId: currentUser.accountId,
projectTypeKey: 'software',
})
.catch((error: AxiosError) => {
Expand Down
1 change: 1 addition & 0 deletions vitest.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,6 @@ export default defineConfig({
enabled: true,
tsconfig: 'tsconfig.lint.json',
},
setupFiles: ['dotenv/config'],
},
});

0 comments on commit e9502d0

Please sign in to comment.