fix(tests): correct import path for git_helper module in updatenotification tests (#4078)

This removes a warning which appeared running a test:

```bash
$ npx vitest --run tests/unit/functions/updatenotification_spec.js

 RUN  v4.1.2

7:46:46 PM [vite] (ssr) warning: invalid import "../../../${defaults.defaultModulesDir}/updatenotification/git_helper". A file extension must be included in the static part of the import. For example: import(`./foo/${bar}.js`).
```

Related to #4073
This commit is contained in:
Kristjan ESPERANTO
2026-04-01 20:09:04 +02:00
committed by GitHub
parent 751b97fc7e
commit d7c4ad178e

View File

@@ -20,7 +20,7 @@ async function createGitHelper (fsStatSyncMockRef, loggerMockRef, execShellSpyRe
vi.doMock("logger", () => loggerMockRef.current);
const defaults = await import("../../../js/defaults");
const gitHelperModule = await import(`../../../${defaults.defaultModulesDir}/updatenotification/git_helper`);
const gitHelperModule = await import(`../../../${defaults.defaultModulesDir}/updatenotification/git_helper.js`);
const GitHelper = gitHelperModule.default || gitHelperModule;
const instance = new GitHelper();
execShellSpyRef.current = vi.spyOn(instance, "execShell");