diff --git a/src/main/webapp/app/springboot/primary/Generator.component.ts b/src/main/webapp/app/springboot/primary/Generator.component.ts index c77e5bf3d2c..244437c0592 100644 --- a/src/main/webapp/app/springboot/primary/Generator.component.ts +++ b/src/main/webapp/app/springboot/primary/Generator.component.ts @@ -42,7 +42,7 @@ export default defineComponent({ const getCurrentProjectHistory = (): Promise => projectHistoryService.get(project.value.folder); const debounceGetProjectHistory = (): void => { if (timeoutId) globalWindow.clearTimeout(timeoutId); - timeoutId = globalWindow.setTimeout(() => getCurrentProjectHistory, 400); + timeoutId = globalWindow.setTimeout(() => getCurrentProjectHistory(), 400); }; return { diff --git a/src/test/javascript/spec/springboot/primary/Generator.spec.ts b/src/test/javascript/spec/springboot/primary/Generator.spec.ts index 87222772199..ef888b89f11 100644 --- a/src/test/javascript/spec/springboot/primary/Generator.spec.ts +++ b/src/test/javascript/spec/springboot/primary/Generator.spec.ts @@ -67,7 +67,7 @@ describe('Generator', () => { component.debounceGetProjectHistory(); const [delayedMethod, timeout] = globalWindow.setTimeout.getCall(0).args; - expect(delayedMethod()).toEqual(component.getCurrentProjectHistory); + expect(delayedMethod()).toEqual(component.getCurrentProjectHistory()); expect(timeout).toBe(400); expect(globalWindow.clearTimeout.called).toBe(false); });