Skip to content

Commit 2d6330f

Browse files
author
newtom28
committed
Fix test-runner
1 parent 760724d commit 2d6330f

File tree

3 files changed

+8
-3
lines changed

3 files changed

+8
-3
lines changed

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -100,11 +100,11 @@ npm run dev
100100
- Settings are stored in `localStorage` under `APP_SETTINGS`.
101101
- In Chrome, view them under DevTools → Application → Local Storage; landmark caches use keys starting with `landmark_`.
102102

103-
**Start server proxy for MSFS "moving map**
103+
**Start server proxy for MSFS "moving map"**
104104

105105
- Install Python with UV and dependencies (see `pyproject.toml`)
106106
- Relies on the [Python‑SimConnect](https://github.com/odwdinc/Python-SimConnect) library
107-
- Run it alongside with MSFS on the same PC
107+
- Install and run it alongside with MSFS on the same PC
108108

109109
```bash
110110
uv pip install .

src/test_runner1.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,11 +53,11 @@ function error(message) {
5353

5454
// Configuration loading
5555
async function loadConfig() {
56+
const { getConfig, setConfig } = await import('./utils.js');
5657
let config = null;
5758
try {
5859
if (isBrowser) {
5960
// Browser environment - call getConfig
60-
const { getConfig } = await import('./utils.js');
6161
config = await getConfig();
6262
} else if (isNode) {
6363
// Node.js environment
@@ -86,6 +86,7 @@ async function loadConfig() {
8686
],
8787
},
8888
};
89+
setConfig(config);
8990
}
9091
return config;
9192
} catch (error) {

src/utils.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,10 @@ export async function getConfig() {
3636
}
3737
}
3838

39+
export function setConfig(config) {
40+
CONFIG_CACHE = config;
41+
}
42+
3943
// Function to get and parse prompts from prompts.json
4044
export async function getPromptinJSON(promptName, variables = {}) {
4145
try {

0 commit comments

Comments
 (0)