Skip to content

Commit d7c4ad1

Browse files
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
1 parent 751b97f commit d7c4ad1

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

tests/unit/functions/updatenotification_spec.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ async function createGitHelper (fsStatSyncMockRef, loggerMockRef, execShellSpyRe
2020
vi.doMock("logger", () => loggerMockRef.current);
2121

2222
const defaults = await import("../../../js/defaults");
23-
const gitHelperModule = await import(`../../../${defaults.defaultModulesDir}/updatenotification/git_helper`);
23+
const gitHelperModule = await import(`../../../${defaults.defaultModulesDir}/updatenotification/git_helper.js`);
2424
const GitHelper = gitHelperModule.default || gitHelperModule;
2525
const instance = new GitHelper();
2626
execShellSpyRef.current = vi.spyOn(instance, "execShell");

0 commit comments

Comments
 (0)