Skip to content

Commit

Permalink
chore: fix types and tests
Browse files Browse the repository at this point in the history
  • Loading branch information
digitalsadhu committed Nov 4, 2024
1 parent 0674a81 commit 2cfa49f
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions lib/podlet.js
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down
4 changes: 2 additions & 2 deletions tests/podlet.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand All @@ -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('<h1>OK!</h1>');
Expand Down

0 comments on commit 2cfa49f

Please sign in to comment.