How to unit test JS in TS based project #252
-
Hello dear all, Description: I have a standard TS based project. There I have some Thanks in advance. |
Beta Was this translation helpful? Give feedback.
Replies: 5 comments 8 replies
-
Hi @unbreakabl3 , for normal JS actions project you need to follow specific structure and put your tests under the src/test but I am not sure if the case is the same for TS oriented projects with JS actions We might need some help from @Michaelpalacce |
Beta Was this translation helpful? Give feedback.
-
Yeap, I got the question, I was just suggesting in case you haven't tried that option. tbh I don't know the answer myself because I haven't had that case, in the meantime I will check back with the team to try and get some feedback. I will write here as soon as I have some answer from them :) |
Beta Was this translation helpful? Give feedback.
-
@unbreakabl3 you can import them with System.getModules as you would normally in Orchestrator and perform the test |
Beta Was this translation helpful? Give feedback.
-
Hi, @Michaelpalacce . If you do have a working example you can share, I will be very appreciative. |
Beta Was this translation helpful? Give feedback.
-
Appreciate. I can confirm the moving of the JS to the sub-folder and adding this folder to the System.getModule() path, solves the issue. |
Beta Was this translation helpful? Give feedback.
Also you may have a problem since you have the files directly under
src
try. putting them one folder deep. I remember that used to be a problem but I don't think we fixed it