From bc574aacaae1de5704a78a7a1a39a05a6e3c1eca Mon Sep 17 00:00:00 2001 From: Andrew Patton Date: Sun, 1 Sep 2024 17:10:58 -0700 Subject: [PATCH] Move test-only export to bottom of file --- packages/styling/src/useStyles.ts | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/packages/styling/src/useStyles.ts b/packages/styling/src/useStyles.ts index 6c79dd34..c2ee5635 100644 --- a/packages/styling/src/useStyles.ts +++ b/packages/styling/src/useStyles.ts @@ -9,8 +9,6 @@ type StyleCache = Map< const styleCache: StyleCache = new Map(); -export const getStyleCache = () => styleCache; - export function useStyles(styles: string, initialHref?: string) { const [stylesItem, setStylesItem] = useState(() => { if (!styles) return { href: '', referenceCount: 0, styles: '' }; @@ -74,3 +72,6 @@ export default useStyles; function sanitizeHref(text: string) { return text.replace(/-/g, ''); } + +// The following export is for test usage only +export const getStyleCache = () => styleCache;