JIRA Forge: Unit Testing

Hi team,

I am working on some scripts to work with JIRA Forge.

Is there any support for automated unit testing?

Thank you!

Hi @DJO – I don’t believe Forge provides any specialized unit testing support or convenience libraries. (Someone should correct me if I’m wrong.) However, you can probably use whatever JS testing framework you prefer.

Personally, I’ve had good success using Jest with Jest Mock Modules for mocking the Forge modules. React Testing Library has been useful for testing a Forge Custom UI. The biggest challenge I’ve personally encountered is unit testing the Forge UI Kit in the same way React Testing Library or Enzyme can be used for testing React UIs. I’m not sure how to go about that.

Not sure if this at all answered your question. Is there something more specific you’re looking for?

1 Like

@AaronMorris1 This helps! Thank you for chiming in.

I just want some code coverage to help us scale the codebase. I will take a look at Jest next.

:beers: cheers!