This PR adds basic unit tests to the x-gift-article component, as it was spotted that no tests currently exist. This is not a 100% full coverage (as its quite difficult to test everything with the component). However, this covers the key features of:
Displays the correct data given its initial props
Displays the correct html when using the "show" functions
Calls the correct APIs
Displays the responses from the API calls
Responds to 0 credit scenarios
To run tests, please run npm run test
You can run, just these unit tests for x-gift-artcle with jest ./components/x-gift-article/__tests__/* --verbose
Jira ticket ---> https://financialtimes.atlassian.net/browse/ACC-2349
This PR adds basic unit tests to the
x-gift-article
component, as it was spotted that no tests currently exist. This is not a 100% full coverage (as its quite difficult to test everything with the component). However, this covers the key features of:To run tests, please run
npm run test
You can run, just these unit tests for x-gift-artcle withjest ./components/x-gift-article/__tests__/* --verbose