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
Göran Sander committed Jul 22, 2024

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
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;

0 comments on commit 39827c8

Please sign in to comment.