From 2cfa49fa37f0db4f26fad092dafd9584e6537084 Mon Sep 17 00:00:00 2001 From: Richard Walker Date: Mon, 4 Nov 2024 15:43:42 +1300 Subject: [PATCH] chore: fix types and tests --- lib/podlet.js | 4 ++-- tests/podlet.test.js | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/lib/podlet.js b/lib/podlet.js index bb88688..e63fcab 100644 --- a/lib/podlet.js +++ b/lib/podlet.js @@ -43,8 +43,8 @@ const { template } = utils; * @property {import("@podium/proxy").PodiumProxyOptions} [proxy] - options that can be provided to configure the @podium/proxy instance used by the podlet. See that module for details. * * @typedef {{ debug: 'true' | 'false', locale: string, deviceType: string, requestedBy: string, mountOrigin: string, mountPathname: string, publicPathname: string }} PodletContext - * @typedef {{ as?: string | false | null, crossorigin?: string | null | boolean, disabled?: boolean | '' | null, hreflang?: string | false | null, title?: string | false | null, media?: string | false | null, rel?: string | false | null, type?: string | false | null, value: string | false | null, strategy?: "beforeInteractive" | "afterInteractive" | "lazy", scope?: "content" | "fallback" | "all" | "shadow-dom", [key: string]: any }} AssetCssLike - * @typedef {{ value: string | null, crossorigin?: string | null | boolean, type?: string | null | false, integrity?: string | null | false, referrerpolicy?: string | null | false, nomodule?: boolean | null | '', async?: boolean | null | '', defer?: boolean | null | '', data?: {[key: string]: string} | Array<{ key: string; value: string }>, strategy?: "beforeInteractive" | "afterInteractive" | "lazy", scope?: "content" | "fallback" | "all" | "shadow-dom", [key: string]: any }} AssetJsLike + * @typedef {{ as?: string | false | null, crossorigin?: string | null | boolean, disabled?: boolean | '' | null, hreflang?: string | false | null, title?: string | false | null, media?: string | false | null, rel?: string | false | null, type?: string | false | null, value: string | false | null, strategy?: "beforeInteractive" | "afterInteractive" | "lazy" | "shadow-dom", scope?: "content" | "fallback" | "all", [key: string]: any }} AssetCssLike + * @typedef {{ value: string | null, crossorigin?: string | null | boolean, type?: string | null | false, integrity?: string | null | false, referrerpolicy?: string | null | false, nomodule?: boolean | null | '', async?: boolean | null | '', defer?: boolean | null | '', data?: {[key: string]: string} | Array<{ key: string; value: string }>, strategy?: "beforeInteractive" | "afterInteractive" | "lazy" | "shadow-dom", scope?: "content" | "fallback" | "all" | "shadow-dom", [key: string]: any }} AssetJsLike */ export default class PodiumPodlet { diff --git a/tests/podlet.test.js b/tests/podlet.test.js index 1a0c781..cfedb39 100644 --- a/tests/podlet.test.js +++ b/tests/podlet.test.js @@ -2125,7 +2125,7 @@ tap.test( ); tap.test( - 'useShadowDOM - css assets with all strategy - should not render link tags inside shadow DOM', + 'useShadowDOM - css assets with no strategy - should not render link tags inside shadow DOM', async (t) => { const options = { ...DEFAULT_OPTIONS, @@ -2134,7 +2134,7 @@ tap.test( }; const podlet = new Podlet(options); - podlet.css({ value: '/foo', strategy: 'all' }); + podlet.css({ value: '/foo' }); const server = new FakeExpressServer(podlet, (req, res) => { res.podiumSend('

OK!

');