UNPKG

@cloudinary/url-gen

Version:

Cloudinary URL-Gen SDK ========================= [![Build Status](https://api.travis-ci.com/cloudinary/js-url-gen.svg?branch=master)](https://app.travis-ci.com/github/cloudinary/js-url-gen) ## About The Cloudinary URL-Gen SDK allows you to quickly and eas

17 lines (16 loc) 513 B
/** * Jest can’t find files with a .js extension. We use this resolver to catch that error and replace the files with a * .ts extension. */ module.exports = (request, options) => { // Jest's default resolver const { defaultResolver } = options; try { return defaultResolver(request, options); // if default resolver fails we replace file extension from .js to .ts } catch (e) { return defaultResolver(request.replace(/\.js$/, '.ts'), options); } }; export {};