From 697775e222f43a931ae2e9ac830a97dbe1854c1b Mon Sep 17 00:00:00 2001 From: Luis Ball Date: Wed, 2 Mar 2022 14:58:52 -0800 Subject: [PATCH] test(types): _buildURL & _buildSrcSet return strings --- types/index.test-d.ts | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/types/index.test-d.ts b/types/index.test-d.ts index bd0a13a9..1286486c 100644 --- a/types/index.test-d.ts +++ b/types/index.test-d.ts @@ -68,3 +68,14 @@ expectType(ImgixClient.targetWidths(minWidth, maxWidth, widthTol)); expectType( ImgixClient.targetWidths(minWidth, maxWidth, widthTol, cache), ); + +const absoluteURL = 'https://test.imgix.net/image.jpg'; + +expectType(ImgixClient._buildURL(absoluteURL, params, {})); +expectType(ImgixClient._buildURL(absoluteURL, params, buildURLOptions)); + +expectType(ImgixClient._buildSrcSet(absoluteURL)); +expectType(ImgixClient._buildSrcSet(absoluteURL, params)); +expectType( + ImgixClient._buildSrcSet(absoluteURL, params, srcsetOptions), +);