ReactJS and API tests responsibility/resources

ReactJS and API tests responsibility/resources

Liana Melissa發表於
Number of replies: 1

Hi all, I've been doing some reading around functional, unit and integration tests for front-end applications and almost all said the testing of the API is up to the back-end developers.

I think writing tests on the front-end to test the API has great benefit because every non-public API I've ever integrated with will make undocumented breaking changes which can bring down your front-end application.

I realise the purpose of the various test types can be opinionated (especially between languages and frameworks) but I'm guessing it will be correct to test the API using functional or integration tests?

Secondly, when it comes to ReactJS + Jest + RxJS are there any good resources covering API tests? All my Googling has only returned writing tests for mock APIs and mostly badly-written tutorials on ReactJS tests.

Thanks.

評比平均分數: -
In reply to Liana Melissa

Re: ReactJS and API tests responsibility/resources

Tim Hunt發表於
Core developers的相片 Documentation writers的相片 Particularly helpful Moodlers的相片 Peer reviewers的相片 Plugin developers的相片

In the Moodle world, the way we test teh UI is using something called Behat. How you have that keyword, you should be able to find the relevant info.