REDROOM
PHP 8.2.30
Path:
Logout
Edit File
Size: 1.24 KB
Close
//proc/thread-self/root/home/byroehnu/.trash/node_modules11/styled-components/test-utils/index.ts
Text
Base64
import { ReactWrapper } from 'enzyme'; import { IStyledComponent } from '../src/types'; function assertElement(element: any) { if (!(element instanceof HTMLElement)) { throw new Error('Must pass a DOM element to find/findAll(element, styledComponent)"'); } } function assertStyledComponent(styledComponent: any) { if ( !styledComponent?.styledComponentId || typeof styledComponent.styledComponentId !== 'string' ) { throw new Error( `${ styledComponent.displayName || styledComponent.name || 'Component' } is not a styled component.` ); } } export function enzymeFind(wrapper: ReactWrapper, styledComponent: IStyledComponent<'web', any>) { assertStyledComponent(styledComponent); return wrapper.find(`.${styledComponent.styledComponentId}`); } export function find(element: Element, styledComponent: IStyledComponent<'web', any>) { assertElement(element); assertStyledComponent(styledComponent); return element.querySelector(`.${styledComponent.styledComponentId}`); } export function findAll(element: Element, styledComponent: IStyledComponent<'web', any>) { assertElement(element); assertStyledComponent(styledComponent); return element.querySelectorAll(`.${styledComponent.styledComponentId}`); }
Save
Close
Exit & Reset
Text mode: syntax highlighting auto-detects file type.
Directory Contents
Dirs: 0 × Files: 2
Delete Selected
Select All
Select None
Sort:
Name
Size
Modified
Enable drag-to-move
Name
Size
Perms
Modified
Actions
index.ts
1.24 KB
lrw-r--r--
2026-02-28 11:43:00
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
setupTestFramework.ts
1.09 KB
lrw-r--r--
2026-02-28 11:43:02
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
Zip Selected
If ZipArchive is unavailable, a
.tar
will be created (no compression).