fix(test): await async getEnvVarOnDemand calls in test setup

This commit is contained in:
2026-02-24 12:59:11 +00:00
parent 413c4be172
commit c8059fb1c0

View File

@@ -7,8 +7,8 @@ const testQenv = new qenv.Qenv('./', '.nogit/');
let gitlabClient: GitLabClient; let gitlabClient: GitLabClient;
tap.test('should create a GitLabClient instance', async () => { tap.test('should create a GitLabClient instance', async () => {
const baseUrl = testQenv.getEnvVarOnDemand('GITLAB_BASE_URL') || 'https://gitlab.com'; const baseUrl = (await testQenv.getEnvVarOnDemand('GITLAB_BASE_URL')) || 'https://gitlab.com';
const token = testQenv.getEnvVarOnDemand('GITLAB_TOKEN') || ''; const token = (await testQenv.getEnvVarOnDemand('GITLAB_TOKEN')) || '';
gitlabClient = new GitLabClient(baseUrl, token); gitlabClient = new GitLabClient(baseUrl, token);
expect(gitlabClient).toBeInstanceOf(GitLabClient); expect(gitlabClient).toBeInstanceOf(GitLabClient);
}); });