From 3f8925425ab9acc422164e6a0afec2d19704e758 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 6c79dd3..c2ee563 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;