Hi Kankelshaku,
Whilst i’ve not gotten as far as CustomUI Jest testing procedure, but am interested in doing so and also face problems with both invoke from forge/bridge and api from forge/api being in the /static directory (hence here).
Did you see the recent post regarding Resolvers for CustomUI? 27 Jul 2021 - Direct product requests, CI upgrade support, and composable routes
(You may not need to use forge bridge if you want to access Confluence/Jira endpoints, and if the getText method is just returning a String you could try the following instead of the invoke:)
//Replace the invoke('getText'..) with the following:
let myInvoke = new ExtractedInvoke();
return await myInvoke.getText();
Then a new file, named ‘ExtractedInvoke’ would be:
export class ExtractedInvoke {
async getText() {
//Whatever your 'getText' was doing here..
}
}
export default ExtractedInvoke;
This workaround means you don’t need the forge/bridge import.