Skip to content

Commit

Permalink
Move test-only export to bottom of file
Browse files Browse the repository at this point in the history
  • Loading branch information
acusti committed Sep 2, 2024
1 parent da19135 commit bc574aa
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions packages/styling/src/useStyles.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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: '' };
Expand Down Expand Up @@ -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;

0 comments on commit bc574aa

Please sign in to comment.