The Pexels Javascript library is a convenient wrapper around the Pexels API that can be used both on the server in Node.js and in the browser.
yarn add pexels
or
npm install pexels --save
See the API docs here
To run the tests you need to provide your own api key. You can get one from here: https://www.pexels.com/api/new/
API_KEY=<REPLACE-WITH-YOUR-API-KEY> yarn test