fix(tests): Refactored test setup for consistency and isolated config initialization.

This commit is contained in:
2024-11-06 16:53:21 +01:00
parent 899e5b0a7d
commit 28cd6d1b49
5 changed files with 41 additions and 34 deletions

View File

@@ -33,7 +33,7 @@ tap.preTask('should create a new machine user for testing', async () => {
tap.test('should create a new cloudlyApiClient', async () => {
testClient = new cloudlyApiClient.CloudlyApiClient({
registerAs: 'api',
cloudlyUrl: `http://localhost:${await helpers.getEnvVarOnDemand('SERVEZONE_PORT')}`,
cloudlyUrl: `http://localhost:${helpers.testCloudlyConfig.publicPort}`,
});
await testClient.start();
expect(testClient).toBeTruthy();