Skip to content

Commit

Permalink
fix(test): Fix broken test of buterping API endpoint
Browse files Browse the repository at this point in the history
  • Loading branch information
Göran Sander committed Jul 22, 2024
1 parent b53eaf7 commit 39827c8
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions src/test/routes/butlerping.test.js
Original file line number Diff line number Diff line change
@@ -1,16 +1,17 @@
import axios from 'axios';
import config from 'config';

// Load global variables and functions
import globals from '../../globals.js';

const instance = axios.create({
baseURL: `http://localhost:${config.get('Butler.restServerConfig.serverPort')}`,
timeout: 15000,
});

let result;

// Load globals dynamically/async to ensure singleton pattern works
const settingsObj = (await import('../../globals.js')).default;
const globals = await settingsObj.init();

// Get app version from package.json
const { appVersion } = globals;

Expand Down

0 comments on commit 39827c8

Please sign in to comment.