diff --git a/.gitignore b/.gitignore index df5c041d8..2d4606cf5 100644 --- a/.gitignore +++ b/.gitignore @@ -2,6 +2,7 @@ .DS_Store *.local *.log* +!*.log*.mdx # Dist node_modules diff --git a/.prettierignore b/.prettierignore index 618372cdd..32ad2e289 100644 --- a/.prettierignore +++ b/.prettierignore @@ -3,9 +3,12 @@ /docs/en/api/react/** /docs/en/api/rspeedy/** +/docs/en/api/lynx-testing-environment/** +/docs/en/api/reactlynx-testing-library/** /docs/zh/api/react/** /docs/zh/api/rspeedy/** - +/docs/zh/api/lynx-testing-environment/** +/docs/zh/api/reactlynx-testing-library/** # generated files /docs/public/living-spec/index.html @@ -24,4 +27,4 @@ src/components/ui docs/zh/guide/use-native-modules.mdx docs/en/guide/use-native-modules.mdx docs/zh/guide/custom-native-modules/** -docs/en/guide/custom-native-modules/** \ No newline at end of file +docs/en/guide/custom-native-modules/** diff --git a/docs/en/api/_meta.json b/docs/en/api/_meta.json index c5fbf5586..533bfb0ce 100644 --- a/docs/en/api/_meta.json +++ b/docs/en/api/_meta.json @@ -49,27 +49,6 @@ { "type": "divider" }, - { - "type": "section-header", - "label": "sidebar.testing-library" - }, - { - "type": "dir", - "name": "lynx-test-environment", - "label": "@lynx-js/test-environment", - "collapsible": true, - "collapsed": true - }, - { - "type": "dir", - "name": "react-lynx-testing-library", - "label": "@lynx-js/react/testing-library", - "collapsible": true, - "collapsed": true - }, - { - "type": "divider" - }, { "type": "section-header", "label": "sidebar.comp" @@ -253,6 +232,27 @@ { "type": "divider" }, + { + "type": "section-header", + "label": "sidebar.testing" + }, + { + "type": "dir", + "name": "lynx-testing-environment", + "label": "@lynx-js/testing-environment", + "collapsible": true, + "collapsed": true + }, + { + "type": "dir", + "name": "reactlynx-testing-library", + "label": "@lynx-js/react/testing-library", + "collapsible": true, + "collapsed": true + }, + { + "type": "divider" + }, { "type": "section-header", "label": "sidebar.engine-api" diff --git a/docs/en/api/lynx-test-environment/index.md b/docs/en/api/lynx-test-environment/index.md deleted file mode 100644 index a47045365..000000000 --- a/docs/en/api/lynx-test-environment/index.md +++ /dev/null @@ -1,11 +0,0 @@ - - -[Home](./index.md) - -## API Reference - -## Packages - -| Package | Description | -| -------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| [@lynx-js/test-environment](./test-environment.md) | A pure-JavaScript implementation of the [Lynx Spec](https://lynxjs.org/guide/spec.html), notably the [Element PAPI](https://lynxjs.org/api/engine/element-api) and [Dual-threaded Model](https://lynxjs.org/guide/spec#dual-threaded-model) for use with Node.js. | diff --git a/docs/en/api/lynx-test-environment/test-environment.elementtree.md b/docs/en/api/lynx-test-environment/test-environment.elementtree.md deleted file mode 100644 index d53daedbc..000000000 --- a/docs/en/api/lynx-test-environment/test-environment.elementtree.md +++ /dev/null @@ -1,13 +0,0 @@ - - -[Home](./index.md) > [@lynx-js/test-environment](./test-environment.md) > [ElementTree](./test-environment.elementtree.md) - -## ElementTree type - -The lynx element tree - -**Signature:** - -```typescript -export type ElementTree = ReturnType; -``` diff --git a/docs/en/api/lynx-test-environment/test-environment.elementtreeglobals.md b/docs/en/api/lynx-test-environment/test-environment.elementtreeglobals.md deleted file mode 100644 index 0b317e51c..000000000 --- a/docs/en/api/lynx-test-environment/test-environment.elementtreeglobals.md +++ /dev/null @@ -1,15 +0,0 @@ - - -[Home](./index.md) > [@lynx-js/test-environment](./test-environment.md) > [ElementTreeGlobals](./test-environment.elementtreeglobals.md) - -## ElementTreeGlobals type - -The Element PAPI Types - -**Signature:** - -```typescript -export type ElementTreeGlobals = PickUnderscoreKeys; -``` - -**References:** [PickUnderscoreKeys](./test-environment.pickunderscorekeys.md), [ElementTree](./test-environment.elementtree.md) diff --git a/docs/en/api/lynx-test-environment/test-environment.filterunderscorekeys.md b/docs/en/api/lynx-test-environment/test-environment.filterunderscorekeys.md deleted file mode 100644 index 3f60bff39..000000000 --- a/docs/en/api/lynx-test-environment/test-environment.filterunderscorekeys.md +++ /dev/null @@ -1,13 +0,0 @@ - - -[Home](./index.md) > [@lynx-js/test-environment](./test-environment.md) > [FilterUnderscoreKeys](./test-environment.filterunderscorekeys.md) - -## FilterUnderscoreKeys type - -**Signature:** - -```typescript -export type FilterUnderscoreKeys = { - [K in keyof T]: K extends `__${string}` ? K : never; -}[keyof T]; -``` diff --git a/docs/en/api/lynx-test-environment/test-environment.initelementtree.md b/docs/en/api/lynx-test-environment/test-environment.initelementtree.md deleted file mode 100644 index ffa0a5722..000000000 --- a/docs/en/api/lynx-test-environment/test-environment.initelementtree.md +++ /dev/null @@ -1,60 +0,0 @@ - - -[Home](./index.md) > [@lynx-js/test-environment](./test-environment.md) > [initElementTree](./test-environment.initelementtree.md) - -## initElementTree() function - -**Signature:** - -```typescript -initElementTree: () => { - root: LynxElement | undefined; - countElement(element: LynxElement, parentComponentUniqueId: number): void; - __CreatePage(_tag: string, parentComponentUniqueId: number): LynxElement; - __CreateRawText(text: string): LynxElement; - __GetElementUniqueID(e: LynxElement): number; - __SetClasses(e: LynxElement, cls: string): void; - __CreateElement(tag: string, parentComponentUniqueId: number): LynxElement; - __CreateView(parentComponentUniqueId: number): LynxElement; - __CreateScrollView(parentComponentUniqueId: number): LynxElement; - __FirstElement(e: LynxElement): LynxElement; - __CreateText(parentComponentUniqueId: number): LynxElement; - __CreateImage(parentComponentUniqueId: number): void; - __CreateWrapperElement(parentComponentUniqueId: number): LynxElement; - __AddInlineStyle(e: HTMLElement, key: number, value: string): void; - __AppendElement(parent: LynxElement, child: LynxElement): void; - __SetCSSId(e: LynxElement | LynxElement[], id: string, entryName?: string): void; - __SetAttribute(e: LynxElement, key: string, value: any): void; - __AddEvent(e: LynxElement, eventType: string, eventName: string, eventHandler: string | Record): void; - __GetEvent(e: LynxElement, eventType: string, eventName: string): { - type: string; - name: string; - jsFunction: any; - } | undefined; - __SetID(e: LynxElement, id: string): void; - __SetInlineStyles(e: LynxElement, styles: string | Record): void; - __AddDataset(e: LynxElement, key: string, value: string): void; - __SetDataset(e: LynxElement, dataset: any): void; - __SetGestureDetector(e: LynxElement, id: number, type: number, config: any, relationMap: Record): void; - __GetDataset(e: LynxElement): DOMStringMap; - __RemoveElement(parent: LynxElement, child: LynxElement): void; - __InsertElementBefore(parent: LynxElement, child: LynxElement, ref?: LynxElement): void; - __ReplaceElement(newElement: LynxElement, oldElement: LynxElement): void; - __FlushElementTree(): void; - __UpdateListComponents(_list: LynxElement, _components: string[]): void; - __UpdateListCallbacks(list: LynxElement, componentAtIndex: (list: LynxElement, listID: number, cellIndex: number, operationID: number, enable_reuse_notification: boolean) => void, enqueueComponent: (list: LynxElement, listID: number, sign: number) => void): void; - __CreateList(parentComponentUniqueId: number, componentAtIndex: any, enqueueComponent: any): LynxElement; - __GetTag(ele: LynxElement): string; - __GetAttributeByName(ele: LynxElement, name: string): string | null; - clear(): void; - toTree(): LynxElement | undefined; - enterListItemAtIndex(e: LynxElement, index: number, ...args: any[]): number; - leaveListItem(e: LynxElement, uiSign: number): void; - toJSON(): LynxElement | undefined; - __GetElementByUniqueId(uniqueId: number): LynxElement | undefined; -} -``` - -**Returns:** - -elementTree diff --git a/docs/en/api/lynx-test-environment/test-environment.lynxelement.cssid.md b/docs/en/api/lynx-test-environment/test-environment.lynxelement.cssid.md deleted file mode 100644 index 0c0a32c74..000000000 --- a/docs/en/api/lynx-test-environment/test-environment.lynxelement.cssid.md +++ /dev/null @@ -1,13 +0,0 @@ - - -[Home](./index.md) > [@lynx-js/test-environment](./test-environment.md) > [LynxElement](./test-environment.lynxelement.md) > [cssId](./test-environment.lynxelement.cssid.md) - -## LynxElement.cssId property - -The cssId of the element - -**Signature:** - -```typescript -cssId?: string; -``` diff --git a/docs/en/api/lynx-test-environment/test-environment.lynxelement.eventmap.md b/docs/en/api/lynx-test-environment/test-environment.lynxelement.eventmap.md deleted file mode 100644 index 252509c76..000000000 --- a/docs/en/api/lynx-test-environment/test-environment.lynxelement.eventmap.md +++ /dev/null @@ -1,15 +0,0 @@ - - -[Home](./index.md) > [@lynx-js/test-environment](./test-environment.md) > [LynxElement](./test-environment.lynxelement.md) > [eventMap](./test-environment.lynxelement.eventmap.md) - -## LynxElement.eventMap property - -The map of events bound to the element. - -**Signature:** - -```typescript -eventMap?: { - [key: string]: any; - }; -``` diff --git a/docs/en/api/lynx-test-environment/test-environment.lynxelement.firstchild.md b/docs/en/api/lynx-test-environment/test-environment.lynxelement.firstchild.md deleted file mode 100644 index b2223fcfc..000000000 --- a/docs/en/api/lynx-test-environment/test-environment.lynxelement.firstchild.md +++ /dev/null @@ -1,15 +0,0 @@ - - -[Home](./index.md) > [@lynx-js/test-environment](./test-environment.md) > [LynxElement](./test-environment.lynxelement.md) > [firstChild](./test-environment.lynxelement.firstchild.md) - -## LynxElement.firstChild property - -Returns the first child. - -[MDN Reference](https://developer.mozilla.org/docs/Web/API/Node/firstChild) - -**Signature:** - -```typescript -firstChild: LynxElement; -``` diff --git a/docs/en/api/lynx-test-environment/test-environment.lynxelement.gesture.md b/docs/en/api/lynx-test-environment/test-environment.lynxelement.gesture.md deleted file mode 100644 index e41797bb5..000000000 --- a/docs/en/api/lynx-test-environment/test-environment.lynxelement.gesture.md +++ /dev/null @@ -1,15 +0,0 @@ - - -[Home](./index.md) > [@lynx-js/test-environment](./test-environment.md) > [LynxElement](./test-environment.lynxelement.md) > [gesture](./test-environment.lynxelement.gesture.md) - -## LynxElement.gesture property - -The gestures bound to the element. - -**Signature:** - -```typescript -gesture?: { - [key: string]: any; - }; -``` diff --git a/docs/en/api/lynx-test-environment/test-environment.lynxelement.md b/docs/en/api/lynx-test-environment/test-environment.lynxelement.md deleted file mode 100644 index 6046c8b3c..000000000 --- a/docs/en/api/lynx-test-environment/test-environment.lynxelement.md +++ /dev/null @@ -1,28 +0,0 @@ - - -[Home](./index.md) > [@lynx-js/test-environment](./test-environment.md) > [LynxElement](./test-environment.lynxelement.md) - -## LynxElement interface - -Any Lynx Element, such as `view`, `text`, `image`, etc. - -[Lynx Spec Reference](https://lynxjs.org/living-spec/index.html?ts=1743416098203#element%E2%91%A0) - -**Signature:** - -```typescript -export interface LynxElement extends HTMLElement -``` - -**Extends:** HTMLElement - -## Properties - -| Property | Modifiers | Type | Description | -| ------------------------------------------------------------ | --------- | ------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------- | -| [cssId?](./test-environment.lynxelement.cssid.md) | | string | _(Optional)_ The cssId of the element | -| [eventMap?](./test-environment.lynxelement.eventmap.md) | | { \[key: string\]: any; } | _(Optional)_ The map of events bound to the element. | -| [firstChild](./test-environment.lynxelement.firstchild.md) | | [LynxElement](./test-environment.lynxelement.md) |

Returns the first child.

[MDN Reference](https://developer.mozilla.org/docs/Web/API/Node/firstChild)

| -| [gesture?](./test-environment.lynxelement.gesture.md) | | { \[key: string\]: any; } | _(Optional)_ The gestures bound to the element. | -| [nextSibling](./test-environment.lynxelement.nextsibling.md) | | [LynxElement](./test-environment.lynxelement.md) |

Returns the next sibling.

[MDN Reference](https://developer.mozilla.org/docs/Web/API/Node/nextSibling)

| -| [parentNode](./test-environment.lynxelement.parentnode.md) | | [LynxElement](./test-environment.lynxelement.md) |

Returns the parent.

[MDN Reference](https://developer.mozilla.org/docs/Web/API/Node/parentNode)

| diff --git a/docs/en/api/lynx-test-environment/test-environment.lynxelement.nextsibling.md b/docs/en/api/lynx-test-environment/test-environment.lynxelement.nextsibling.md deleted file mode 100644 index d14c5da05..000000000 --- a/docs/en/api/lynx-test-environment/test-environment.lynxelement.nextsibling.md +++ /dev/null @@ -1,15 +0,0 @@ - - -[Home](./index.md) > [@lynx-js/test-environment](./test-environment.md) > [LynxElement](./test-environment.lynxelement.md) > [nextSibling](./test-environment.lynxelement.nextsibling.md) - -## LynxElement.nextSibling property - -Returns the next sibling. - -[MDN Reference](https://developer.mozilla.org/docs/Web/API/Node/nextSibling) - -**Signature:** - -```typescript -nextSibling: LynxElement; -``` diff --git a/docs/en/api/lynx-test-environment/test-environment.lynxelement.parentnode.md b/docs/en/api/lynx-test-environment/test-environment.lynxelement.parentnode.md deleted file mode 100644 index 7e9259f60..000000000 --- a/docs/en/api/lynx-test-environment/test-environment.lynxelement.parentnode.md +++ /dev/null @@ -1,15 +0,0 @@ - - -[Home](./index.md) > [@lynx-js/test-environment](./test-environment.md) > [LynxElement](./test-environment.lynxelement.md) > [parentNode](./test-environment.lynxelement.parentnode.md) - -## LynxElement.parentNode property - -Returns the parent. - -[MDN Reference](https://developer.mozilla.org/docs/Web/API/Node/parentNode) - -**Signature:** - -```typescript -parentNode: LynxElement; -``` diff --git a/docs/en/api/lynx-test-environment/test-environment.lynxenv._constructor_.md b/docs/en/api/lynx-test-environment/test-environment.lynxenv._constructor_.md deleted file mode 100644 index 8f1af63d2..000000000 --- a/docs/en/api/lynx-test-environment/test-environment.lynxenv._constructor_.md +++ /dev/null @@ -1,13 +0,0 @@ - - -[Home](./index.md) > [@lynx-js/test-environment](./test-environment.md) > [LynxEnv](./test-environment.lynxenv.md) > [(constructor)](./test-environment.lynxenv._constructor_.md) - -## LynxEnv.(constructor) - -Constructs a new instance of the `LynxEnv` class - -**Signature:** - -```typescript -constructor(); -``` diff --git a/docs/en/api/lynx-test-environment/test-environment.lynxenv.backgroundthread.md b/docs/en/api/lynx-test-environment/test-environment.lynxenv.backgroundthread.md deleted file mode 100644 index 0b07cbd3a..000000000 --- a/docs/en/api/lynx-test-environment/test-environment.lynxenv.backgroundthread.md +++ /dev/null @@ -1,25 +0,0 @@ - - -[Home](./index.md) > [@lynx-js/test-environment](./test-environment.md) > [LynxEnv](./test-environment.lynxenv.md) > [backgroundThread](./test-environment.lynxenv.backgroundthread.md) - -## LynxEnv.backgroundThread property - -The global object for the background thread. - -**Signature:** - -```typescript -backgroundThread: LynxGlobalThis; -``` - -## Example - -```ts -import { LynxEnv } from '@lynx-js/test-environment'; - -const lynxEnv = new LynxEnv(); - -lynxEnv.switchToBackgroundThread(); -// use the background thread global object -globalThis.lynxCoreInject.tt.OnLifecycleEvent(...args); -``` diff --git a/docs/en/api/lynx-test-environment/test-environment.lynxenv.clearglobal.md b/docs/en/api/lynx-test-environment/test-environment.lynxenv.clearglobal.md deleted file mode 100644 index cb9b8e181..000000000 --- a/docs/en/api/lynx-test-environment/test-environment.lynxenv.clearglobal.md +++ /dev/null @@ -1,15 +0,0 @@ - - -[Home](./index.md) > [@lynx-js/test-environment](./test-environment.md) > [LynxEnv](./test-environment.lynxenv.md) > [clearGlobal](./test-environment.lynxenv.clearglobal.md) - -## LynxEnv.clearGlobal() method - -**Signature:** - -```typescript -clearGlobal(): void; -``` - -**Returns:** - -void diff --git a/docs/en/api/lynx-test-environment/test-environment.lynxenv.injectglobals.md b/docs/en/api/lynx-test-environment/test-environment.lynxenv.injectglobals.md deleted file mode 100644 index 7c06104f6..000000000 --- a/docs/en/api/lynx-test-environment/test-environment.lynxenv.injectglobals.md +++ /dev/null @@ -1,15 +0,0 @@ - - -[Home](./index.md) > [@lynx-js/test-environment](./test-environment.md) > [LynxEnv](./test-environment.lynxenv.md) > [injectGlobals](./test-environment.lynxenv.injectglobals.md) - -## LynxEnv.injectGlobals() method - -**Signature:** - -```typescript -injectGlobals(): void; -``` - -**Returns:** - -void diff --git a/docs/en/api/lynx-test-environment/test-environment.lynxenv.jsdom.md b/docs/en/api/lynx-test-environment/test-environment.lynxenv.jsdom.md deleted file mode 100644 index 989f4fc6c..000000000 --- a/docs/en/api/lynx-test-environment/test-environment.lynxenv.jsdom.md +++ /dev/null @@ -1,11 +0,0 @@ - - -[Home](./index.md) > [@lynx-js/test-environment](./test-environment.md) > [LynxEnv](./test-environment.lynxenv.md) > [jsdom](./test-environment.lynxenv.jsdom.md) - -## LynxEnv.jsdom property - -**Signature:** - -```typescript -jsdom: JSDOM; -``` diff --git a/docs/en/api/lynx-test-environment/test-environment.lynxenv.mainthread.md b/docs/en/api/lynx-test-environment/test-environment.lynxenv.mainthread.md deleted file mode 100644 index 34f5abdc7..000000000 --- a/docs/en/api/lynx-test-environment/test-environment.lynxenv.mainthread.md +++ /dev/null @@ -1,27 +0,0 @@ - - -[Home](./index.md) > [@lynx-js/test-environment](./test-environment.md) > [LynxEnv](./test-environment.lynxenv.md) > [mainThread](./test-environment.lynxenv.mainthread.md) - -## LynxEnv.mainThread property - -The global object for the main thread. - -**Signature:** - -```typescript -mainThread: LynxGlobalThis & ElementTreeGlobals; -``` - -## Example - -```ts -import { LynxEnv } from '@lynx-js/test-environment'; - -const lynxEnv = new LynxEnv(); - -lynxEnv.switchToMainThread(); -// use the main thread global object -const page = globalThis.__CreatePage('0', 0); -const view = globalThis.__CreateView(0); -globalThis.__AppendElement(page, view); -``` diff --git a/docs/en/api/lynx-test-environment/test-environment.lynxenv.md b/docs/en/api/lynx-test-environment/test-environment.lynxenv.md deleted file mode 100644 index dd43ea832..000000000 --- a/docs/en/api/lynx-test-environment/test-environment.lynxenv.md +++ /dev/null @@ -1,51 +0,0 @@ - - -[Home](./index.md) > [@lynx-js/test-environment](./test-environment.md) > [LynxEnv](./test-environment.lynxenv.md) - -## LynxEnv class - -A pure-JavaScript implementation of the [Lynx Spec](https://lynxjs.org/guide/spec.html), notably the [Element PAPI](https://lynxjs.org/api/engine/element-api) and [Dual-threaded Model](https://lynxjs.org/guide/spec#dual-threaded-model) for use with Node.js. - -**Signature:** - -```typescript -export declare class LynxEnv -``` - -## Example - -```ts -import { LynxEnv } from '@lynx-js/test-environment'; - -const lynxEnv = new LynxEnv(); - -lynxEnv.switchToMainThread(); -// use the main thread Element PAPI -const page = __CreatePage('0', 0); -const view = __CreateView(0); -__AppendElement(page, view); -``` - -## Constructors - -| Constructor | Modifiers | Description | -| -------------------------------------------------------------- | --------- | ----------------------------------------------------------- | -| [(constructor)()](./test-environment.lynxenv._constructor_.md) | | Constructs a new instance of the LynxEnv class | - -## Properties - -| Property | Modifiers | Type | Description | -| ------------------------------------------------------------------ | --------- | --------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------- | -| [backgroundThread](./test-environment.lynxenv.backgroundthread.md) | | [LynxGlobalThis](./test-environment.lynxglobalthis.md) | The global object for the background thread. | -| [jsdom](./test-environment.lynxenv.jsdom.md) | | JSDOM | | -| [mainThread](./test-environment.lynxenv.mainthread.md) | | [LynxGlobalThis](./test-environment.lynxglobalthis.md) & [ElementTreeGlobals](./test-environment.elementtreeglobals.md) | The global object for the main thread. | - -## Methods - -| Method | Modifiers | Description | -| ------------------------------------------------------------------------------------ | --------- | ----------- | -| [clearGlobal()](./test-environment.lynxenv.clearglobal.md) | | | -| [injectGlobals()](./test-environment.lynxenv.injectglobals.md) | | | -| [resetLynxEnv()](./test-environment.lynxenv.resetlynxenv.md) | | | -| [switchToBackgroundThread()](./test-environment.lynxenv.switchtobackgroundthread.md) | | | -| [switchToMainThread()](./test-environment.lynxenv.switchtomainthread.md) | | | diff --git a/docs/en/api/lynx-test-environment/test-environment.lynxenv.resetlynxenv.md b/docs/en/api/lynx-test-environment/test-environment.lynxenv.resetlynxenv.md deleted file mode 100644 index 5f27a89ff..000000000 --- a/docs/en/api/lynx-test-environment/test-environment.lynxenv.resetlynxenv.md +++ /dev/null @@ -1,15 +0,0 @@ - - -[Home](./index.md) > [@lynx-js/test-environment](./test-environment.md) > [LynxEnv](./test-environment.lynxenv.md) > [resetLynxEnv](./test-environment.lynxenv.resetlynxenv.md) - -## LynxEnv.resetLynxEnv() method - -**Signature:** - -```typescript -resetLynxEnv(): void; -``` - -**Returns:** - -void diff --git a/docs/en/api/lynx-test-environment/test-environment.lynxenv.switchtobackgroundthread.md b/docs/en/api/lynx-test-environment/test-environment.lynxenv.switchtobackgroundthread.md deleted file mode 100644 index 478bc01bf..000000000 --- a/docs/en/api/lynx-test-environment/test-environment.lynxenv.switchtobackgroundthread.md +++ /dev/null @@ -1,15 +0,0 @@ - - -[Home](./index.md) > [@lynx-js/test-environment](./test-environment.md) > [LynxEnv](./test-environment.lynxenv.md) > [switchToBackgroundThread](./test-environment.lynxenv.switchtobackgroundthread.md) - -## LynxEnv.switchToBackgroundThread() method - -**Signature:** - -```typescript -switchToBackgroundThread(): void; -``` - -**Returns:** - -void diff --git a/docs/en/api/lynx-test-environment/test-environment.lynxenv.switchtomainthread.md b/docs/en/api/lynx-test-environment/test-environment.lynxenv.switchtomainthread.md deleted file mode 100644 index 4a1c9873a..000000000 --- a/docs/en/api/lynx-test-environment/test-environment.lynxenv.switchtomainthread.md +++ /dev/null @@ -1,15 +0,0 @@ - - -[Home](./index.md) > [@lynx-js/test-environment](./test-environment.md) > [LynxEnv](./test-environment.lynxenv.md) > [switchToMainThread](./test-environment.lynxenv.switchtomainthread.md) - -## LynxEnv.switchToMainThread() method - -**Signature:** - -```typescript -switchToMainThread(): void; -``` - -**Returns:** - -void diff --git a/docs/en/api/lynx-test-environment/test-environment.lynxglobalthis.globalthis.md b/docs/en/api/lynx-test-environment/test-environment.lynxglobalthis.globalthis.md deleted file mode 100644 index 6e07c9f49..000000000 --- a/docs/en/api/lynx-test-environment/test-environment.lynxglobalthis.globalthis.md +++ /dev/null @@ -1,13 +0,0 @@ - - -[Home](./index.md) > [@lynx-js/test-environment](./test-environment.md) > [LynxGlobalThis](./test-environment.lynxglobalthis.md) > [globalThis](./test-environment.lynxglobalthis.globalthis.md) - -## LynxGlobalThis.globalThis property - -The globalThis object. - -**Signature:** - -```typescript -globalThis: LynxGlobalThis; -``` diff --git a/docs/en/api/lynx-test-environment/test-environment.lynxglobalthis.md b/docs/en/api/lynx-test-environment/test-environment.lynxglobalthis.md deleted file mode 100644 index 0bda8fdaf..000000000 --- a/docs/en/api/lynx-test-environment/test-environment.lynxglobalthis.md +++ /dev/null @@ -1,19 +0,0 @@ - - -[Home](./index.md) > [@lynx-js/test-environment](./test-environment.md) > [LynxGlobalThis](./test-environment.lynxglobalthis.md) - -## LynxGlobalThis interface - -The `globalThis` object of Lynx dual thread environment. - -**Signature:** - -```typescript -export interface LynxGlobalThis -``` - -## Properties - -| Property | Modifiers | Type | Description | -| ------------------------------------------------------------- | --------- | ------------------------------------------------------ | ---------------------- | -| [globalThis](./test-environment.lynxglobalthis.globalthis.md) | | [LynxGlobalThis](./test-environment.lynxglobalthis.md) | The globalThis object. | diff --git a/docs/en/api/lynx-test-environment/test-environment.md b/docs/en/api/lynx-test-environment/test-environment.md deleted file mode 100644 index 330dad730..000000000 --- a/docs/en/api/lynx-test-environment/test-environment.md +++ /dev/null @@ -1,35 +0,0 @@ - - -[Home](./index.md) > [@lynx-js/test-environment](./test-environment.md) - -## test-environment package - -A pure-JavaScript implementation of the [Lynx Spec](https://lynxjs.org/guide/spec.html), notably the [Element PAPI](https://lynxjs.org/api/engine/element-api) and [Dual-threaded Model](https://lynxjs.org/guide/spec#dual-threaded-model) for use with Node.js. - -## Classes - -| Class | Description | -| ---------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| [LynxEnv](./test-environment.lynxenv.md) | A pure-JavaScript implementation of the [Lynx Spec](https://lynxjs.org/guide/spec.html), notably the [Element PAPI](https://lynxjs.org/api/engine/element-api) and [Dual-threaded Model](https://lynxjs.org/guide/spec#dual-threaded-model) for use with Node.js. | - -## Functions - -| Function | Description | -| ---------------------------------------------------------- | ----------- | -| [initElementTree()](./test-environment.initelementtree.md) | | - -## Interfaces - -| Interface | Description | -| ------------------------------------------------------ | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| [LynxElement](./test-environment.lynxelement.md) |

Any Lynx Element, such as view, text, image, etc.

[Lynx Spec Reference](https://lynxjs.org/living-spec/index.html?ts=1743416098203#element%E2%91%A0)

| -| [LynxGlobalThis](./test-environment.lynxglobalthis.md) | The globalThis object of Lynx dual thread environment. | - -## Type Aliases - -| Type Alias | Description | -| ------------------------------------------------------------------ | ---------------------- | -| [ElementTree](./test-environment.elementtree.md) | The lynx element tree | -| [ElementTreeGlobals](./test-environment.elementtreeglobals.md) | The Element PAPI Types | -| [FilterUnderscoreKeys](./test-environment.filterunderscorekeys.md) | | -| [PickUnderscoreKeys](./test-environment.pickunderscorekeys.md) | | diff --git a/docs/en/api/lynx-test-environment/test-environment.pickunderscorekeys.md b/docs/en/api/lynx-test-environment/test-environment.pickunderscorekeys.md deleted file mode 100644 index e08ebdd0a..000000000 --- a/docs/en/api/lynx-test-environment/test-environment.pickunderscorekeys.md +++ /dev/null @@ -1,13 +0,0 @@ - - -[Home](./index.md) > [@lynx-js/test-environment](./test-environment.md) > [PickUnderscoreKeys](./test-environment.pickunderscorekeys.md) - -## PickUnderscoreKeys type - -**Signature:** - -```typescript -export type PickUnderscoreKeys = Pick>; -``` - -**References:** [FilterUnderscoreKeys](./test-environment.filterunderscorekeys.md) diff --git a/docs/en/api/lynx-testing-environment/Class.LynxTestingEnv.mdx b/docs/en/api/lynx-testing-environment/Class.LynxTestingEnv.mdx new file mode 100644 index 000000000..8e6307077 --- /dev/null +++ b/docs/en/api/lynx-testing-environment/Class.LynxTestingEnv.mdx @@ -0,0 +1,193 @@ +{/* +* This file is generated by @lynx-js/tool-typedoc. +* Do not edit this file directly. +* @generated +*/} + +{/* Import all components as Lynx to allow dynamic lookup in TSDoc writings. */} +import * as Lynx from '@lynx'; + + +[lynx-testing-environment](/api/lynx-testing-environment/index.mdx) / LynxTestingEnv + +# Class: LynxTestingEnv + +A pure-JavaScript implementation of the [Lynx Spec](https://lynxjs.org/guide/spec.html), +notably the [Element PAPI](https://lynxjs.org/api/engine/element-api) and [Dual-threaded Model](https://lynxjs.org/guide/spec#dual-threaded-model) for use with Node.js. + +## Example + +```ts +import { LynxTestingEnv } from '@lynx-js/testing-environment'; + +const lynxTestingEnv = new LynxTestingEnv(); + +lynxTestingEnv.switchToMainThread(); +// use the main thread Element PAPI +const page = __CreatePage('0', 0); +const view = __CreateView(0); +__AppendElement(page, view); + +``` + +## Constructors + +### new LynxTestingEnv() + +```ts +new LynxTestingEnv(): LynxTestingEnv +``` + +#### Returns + +[`LynxTestingEnv`](/api/lynx-testing-environment/Class.LynxTestingEnv.mdx) + +#### Defined in + +index.d.ts:108 + +## Properties + +### backgroundThread + +```ts +backgroundThread: LynxGlobalThis; +``` + +The global object for the background thread. + +#### Example + +```ts +import { LynxTestingEnv } from '@lynx-js/testing-environment'; + +const lynxTestingEnv = new LynxTestingEnv(); + +lynxTestingEnv.switchToBackgroundThread(); +// use the background thread global object +globalThis.lynxCoreInject.tt.OnLifecycleEvent(...args); +``` + +#### Defined in + +index.d.ts:88 + +*** + +### jsdom + +```ts +jsdom: JSDOM; +``` + +#### Defined in + +index.d.ts:107 + +*** + +### mainThread + +```ts +mainThread: LynxGlobalThis & ElementTreeGlobals; +``` + +The global object for the main thread. + +#### Example + +```ts +import { LynxTestingEnv } from '@lynx-js/testing-environment'; + +const lynxTestingEnv = new LynxTestingEnv(); + +lynxTestingEnv.switchToMainThread(); +// use the main thread global object +const page = globalThis.__CreatePage('0', 0); +const view = globalThis.__CreateView(0); +globalThis.__AppendElement(page, view); +``` + +#### Defined in + +index.d.ts:106 + +## Methods + +### clearGlobal() + +```ts +clearGlobal(): void +``` + +#### Returns + +`void` + +#### Defined in + +index.d.ts:112 + +*** + +### injectGlobals() + +```ts +injectGlobals(): void +``` + +#### Returns + +`void` + +#### Defined in + +index.d.ts:109 + +*** + +### reset() + +```ts +reset(): void +``` + +#### Returns + +`void` + +#### Defined in + +index.d.ts:113 + +*** + +### switchToBackgroundThread() + +```ts +switchToBackgroundThread(): void +``` + +#### Returns + +`void` + +#### Defined in + +index.d.ts:110 + +*** + +### switchToMainThread() + +```ts +switchToMainThread(): void +``` + +#### Returns + +`void` + +#### Defined in + +index.d.ts:111 diff --git a/docs/en/api/lynx-testing-environment/Function.initElementTree.mdx b/docs/en/api/lynx-testing-environment/Function.initElementTree.mdx new file mode 100644 index 000000000..975d65014 --- /dev/null +++ b/docs/en/api/lynx-testing-environment/Function.initElementTree.mdx @@ -0,0 +1,523 @@ +{/* +* This file is generated by @lynx-js/tool-typedoc. +* Do not edit this file directly. +* @generated +*/} + +{/* Import all components as Lynx to allow dynamic lookup in TSDoc writings. */} +import * as Lynx from '@lynx'; + + +[lynx-testing-environment](/api/lynx-testing-environment/index.mdx) / initElementTree + +# Function: initElementTree() + +```ts +function initElementTree(): object +``` + +## Returns + +`object` + +### root + +```ts +root: undefined | LynxElement; +``` + +### \_\_AddDataset() + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `e` | [`LynxElement`](/api/lynx-testing-environment/Interface.LynxElement.mdx) | +| `key` | `string` | +| `value` | `string` | + +#### Returns + +`void` + +### \_\_AddEvent() + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `e` | [`LynxElement`](/api/lynx-testing-environment/Interface.LynxElement.mdx) | +| `eventType` | `string` | +| `eventName` | `string` | +| `eventHandler` | `string` \| `Record`\<`string`, `any`\> | + +#### Returns + +`void` + +### \_\_AddInlineStyle() + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `e` | `HTMLElement` | +| `key` | `number` | +| `value` | `string` | + +#### Returns + +`void` + +### \_\_AppendElement() + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `parent` | [`LynxElement`](/api/lynx-testing-environment/Interface.LynxElement.mdx) | +| `child` | [`LynxElement`](/api/lynx-testing-environment/Interface.LynxElement.mdx) | + +#### Returns + +`void` + +### \_\_CreateElement() + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `tag` | `string` | +| `parentComponentUniqueId` | `number` | + +#### Returns + +[`LynxElement`](/api/lynx-testing-environment/Interface.LynxElement.mdx) + +### \_\_CreateImage() + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `parentComponentUniqueId` | `number` | + +#### Returns + +[`LynxElement`](/api/lynx-testing-environment/Interface.LynxElement.mdx) + +### \_\_CreateList() + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `parentComponentUniqueId` | `number` | +| `componentAtIndex` | `any` | +| `enqueueComponent` | `any` | + +#### Returns + +[`LynxElement`](/api/lynx-testing-environment/Interface.LynxElement.mdx) + +### \_\_CreatePage() + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `_tag` | `string` | +| `parentComponentUniqueId` | `number` | + +#### Returns + +[`LynxElement`](/api/lynx-testing-environment/Interface.LynxElement.mdx) + +### \_\_CreateRawText() + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `text` | `string` | + +#### Returns + +[`LynxElement`](/api/lynx-testing-environment/Interface.LynxElement.mdx) + +### \_\_CreateScrollView() + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `parentComponentUniqueId` | `number` | + +#### Returns + +[`LynxElement`](/api/lynx-testing-environment/Interface.LynxElement.mdx) + +### \_\_CreateText() + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `parentComponentUniqueId` | `number` | + +#### Returns + +[`LynxElement`](/api/lynx-testing-environment/Interface.LynxElement.mdx) + +### \_\_CreateView() + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `parentComponentUniqueId` | `number` | + +#### Returns + +[`LynxElement`](/api/lynx-testing-environment/Interface.LynxElement.mdx) + +### \_\_CreateWrapperElement() + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `parentComponentUniqueId` | `number` | + +#### Returns + +[`LynxElement`](/api/lynx-testing-environment/Interface.LynxElement.mdx) + +### \_\_FirstElement() + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `e` | [`LynxElement`](/api/lynx-testing-environment/Interface.LynxElement.mdx) | + +#### Returns + +[`LynxElement`](/api/lynx-testing-environment/Interface.LynxElement.mdx) + +### \_\_FlushElementTree() + +#### Returns + +`void` + +### \_\_GetAttributeByName() + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `ele` | [`LynxElement`](/api/lynx-testing-environment/Interface.LynxElement.mdx) | +| `name` | `string` | + +#### Returns + +`null` \| `string` + +### \_\_GetDataset() + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `e` | [`LynxElement`](/api/lynx-testing-environment/Interface.LynxElement.mdx) | + +#### Returns + +`DOMStringMap` + +### \_\_GetElementByUniqueId() + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `uniqueId` | `number` | + +#### Returns + +`undefined` \| [`LynxElement`](/api/lynx-testing-environment/Interface.LynxElement.mdx) + +### \_\_GetElementUniqueID() + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `e` | [`LynxElement`](/api/lynx-testing-environment/Interface.LynxElement.mdx) | + +#### Returns + +`number` + +### \_\_GetEvent() + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `e` | [`LynxElement`](/api/lynx-testing-environment/Interface.LynxElement.mdx) | +| `eventType` | `string` | +| `eventName` | `string` | + +#### Returns + +`undefined` \| `object` + +### \_\_GetTag() + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `ele` | [`LynxElement`](/api/lynx-testing-environment/Interface.LynxElement.mdx) | + +#### Returns + +`string` + +### \_\_InsertElementBefore() + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `parent` | [`LynxElement`](/api/lynx-testing-environment/Interface.LynxElement.mdx) | +| `child` | [`LynxElement`](/api/lynx-testing-environment/Interface.LynxElement.mdx) | +| `ref`? | [`LynxElement`](/api/lynx-testing-environment/Interface.LynxElement.mdx) | + +#### Returns + +`void` + +### \_\_RemoveElement() + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `parent` | [`LynxElement`](/api/lynx-testing-environment/Interface.LynxElement.mdx) | +| `child` | [`LynxElement`](/api/lynx-testing-environment/Interface.LynxElement.mdx) | + +#### Returns + +`void` + +### \_\_ReplaceElement() + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `newElement` | [`LynxElement`](/api/lynx-testing-environment/Interface.LynxElement.mdx) | +| `oldElement` | [`LynxElement`](/api/lynx-testing-environment/Interface.LynxElement.mdx) | + +#### Returns + +`void` + +### \_\_SetAttribute() + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `e` | [`LynxElement`](/api/lynx-testing-environment/Interface.LynxElement.mdx) | +| `key` | `string` | +| `value` | `any` | + +#### Returns + +`void` + +### \_\_SetClasses() + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `e` | [`LynxElement`](/api/lynx-testing-environment/Interface.LynxElement.mdx) | +| `cls` | `string` | + +#### Returns + +`void` + +### \_\_SetCSSId() + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `e` | [`LynxElement`](/api/lynx-testing-environment/Interface.LynxElement.mdx) \| [`LynxElement`](/api/lynx-testing-environment/Interface.LynxElement.mdx)[] | +| `id` | `string` | +| `entryName`? | `string` | + +#### Returns + +`void` + +### \_\_SetDataset() + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `e` | [`LynxElement`](/api/lynx-testing-environment/Interface.LynxElement.mdx) | +| `dataset` | `any` | + +#### Returns + +`void` + +### \_\_SetGestureDetector() + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `e` | [`LynxElement`](/api/lynx-testing-environment/Interface.LynxElement.mdx) | +| `id` | `number` | +| `type` | `number` | +| `config` | `any` | +| `relationMap` | `Record`\<`string`, `number`[]\> | + +#### Returns + +`void` + +### \_\_SetID() + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `e` | [`LynxElement`](/api/lynx-testing-environment/Interface.LynxElement.mdx) | +| `id` | `string` | + +#### Returns + +`void` + +### \_\_SetInlineStyles() + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `e` | [`LynxElement`](/api/lynx-testing-environment/Interface.LynxElement.mdx) | +| `styles` | `string` \| `Record`\<`string`, `string`\> | + +#### Returns + +`void` + +### \_\_UpdateListCallbacks() + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `list` | [`LynxElement`](/api/lynx-testing-environment/Interface.LynxElement.mdx) | +| `componentAtIndex` | (`list`: [`LynxElement`](/api/lynx-testing-environment/Interface.LynxElement.mdx), `listID`: `number`, `cellIndex`: `number`, `operationID`: `number`, `enable_reuse_notification`: `boolean`) => `void` | +| `enqueueComponent` | (`list`: [`LynxElement`](/api/lynx-testing-environment/Interface.LynxElement.mdx), `listID`: `number`, `sign`: `number`) => `void` | + +#### Returns + +`void` + +### \_\_UpdateListComponents() + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `_list` | [`LynxElement`](/api/lynx-testing-environment/Interface.LynxElement.mdx) | +| `_components` | `string`[] | + +#### Returns + +`void` + +### clear() + +#### Returns + +`void` + +### countElement() + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `element` | [`LynxElement`](/api/lynx-testing-environment/Interface.LynxElement.mdx) | +| `parentComponentUniqueId` | `number` | + +#### Returns + +`void` + +### enterListItemAtIndex() + +Enter a list-item element at the given index. +It will load the list-item element using the `componentAtIndex` callback. + +#### Parameters + +| Parameter | Type | Description | +| ------ | ------ | ------ | +| `e` | [`LynxElement`](/api/lynx-testing-environment/Interface.LynxElement.mdx) | The list element | +| `index` | `number` | The index of the list-item element | +| ...`args` | `any`[] | The arguments used to create the list-item element | + +#### Returns + +`number` + +The unique id of the list-item element + +### leaveListItem() + +Leave a list-item element. +It will mark the list-item element as unused using +the `enqueueComponent` callback, and the list-item element +will be reused in the future by other list-item elements. + +#### Parameters + +| Parameter | Type | Description | +| ------ | ------ | ------ | +| `e` | [`LynxElement`](/api/lynx-testing-environment/Interface.LynxElement.mdx) | The list element | +| `uiSign` | `number` | The unique id of the list-item element | + +#### Returns + +`void` + +### toJSON() + +#### Returns + +`undefined` \| [`LynxElement`](/api/lynx-testing-environment/Interface.LynxElement.mdx) + +### toTree() + +#### Returns + +`undefined` \| [`LynxElement`](/api/lynx-testing-environment/Interface.LynxElement.mdx) + +## Defined in + +lynx/ElementPAPI.d.ts:47 diff --git a/docs/en/api/lynx-testing-environment/Interface.LynxElement.mdx b/docs/en/api/lynx-testing-environment/Interface.LynxElement.mdx new file mode 100644 index 000000000..8271d3127 --- /dev/null +++ b/docs/en/api/lynx-testing-environment/Interface.LynxElement.mdx @@ -0,0 +1,119 @@ +{/* +* This file is generated by @lynx-js/tool-typedoc. +* Do not edit this file directly. +* @generated +*/} + +{/* Import all components as Lynx to allow dynamic lookup in TSDoc writings. */} +import * as Lynx from '@lynx'; + + +[lynx-testing-environment](/api/lynx-testing-environment/index.mdx) / LynxElement + +# Interface: LynxElement + +Any Lynx Element, such as `view`, `text`, `image`, etc. + +[Lynx Spec Reference](https://lynxjs.org/living-spec/index.html?ts=1743416098203#element%E2%91%A0) + +## Extends + +- `HTMLElement` + +## Properties + +### cssId? + +```ts +optional cssId: string; +``` + +The cssId of the element + +#### Defined in + +lynx/ElementPAPI.d.ts:24 + +*** + +### eventMap? + +```ts +optional eventMap: object; +``` + +The map of events bound to the element. + +#### Index Signature + + \[`key`: `string`\]: `any` + +#### Defined in + +lynx/ElementPAPI.d.ts:12 + +*** + +### firstChild + +```ts +firstChild: LynxElement; +``` + +Returns the first child. + +[MDN Reference](https://developer.mozilla.org/docs/Web/API/Node/firstChild) + +#### Defined in + +lynx/ElementPAPI.d.ts:30 + +*** + +### gesture? + +```ts +optional gesture: object; +``` + +The gestures bound to the element. + +#### Index Signature + + \[`key`: `string`\]: `any` + +#### Defined in + +lynx/ElementPAPI.d.ts:18 + +*** + +### nextSibling + +```ts +nextSibling: LynxElement; +``` + +Returns the next sibling. + +[MDN Reference](https://developer.mozilla.org/docs/Web/API/Node/nextSibling) + +#### Defined in + +lynx/ElementPAPI.d.ts:36 + +*** + +### parentNode + +```ts +parentNode: LynxElement; +``` + +Returns the parent. + +[MDN Reference](https://developer.mozilla.org/docs/Web/API/Node/parentNode) + +#### Defined in + +lynx/ElementPAPI.d.ts:42 diff --git a/docs/en/api/lynx-testing-environment/Interface.LynxGlobalThis.mdx b/docs/en/api/lynx-testing-environment/Interface.LynxGlobalThis.mdx new file mode 100644 index 000000000..75ab4c54e --- /dev/null +++ b/docs/en/api/lynx-testing-environment/Interface.LynxGlobalThis.mdx @@ -0,0 +1,33 @@ +{/* +* This file is generated by @lynx-js/tool-typedoc. +* Do not edit this file directly. +* @generated +*/} + +{/* Import all components as Lynx to allow dynamic lookup in TSDoc writings. */} +import * as Lynx from '@lynx'; + + +[lynx-testing-environment](/api/lynx-testing-environment/index.mdx) / LynxGlobalThis + +# Interface: LynxGlobalThis + +The `globalThis` object of Lynx dual thread environment. + +## Indexable + + \[`key`: `string`\]: `any` + +## Properties + +### globalThis + +```ts +globalThis: LynxGlobalThis; +``` + +The globalThis object. + +#### Defined in + +lynx/GlobalThis.d.ts:11 diff --git a/docs/en/api/lynx-testing-environment/TypeAlias.ElementTree.mdx b/docs/en/api/lynx-testing-environment/TypeAlias.ElementTree.mdx new file mode 100644 index 000000000..3d611c797 --- /dev/null +++ b/docs/en/api/lynx-testing-environment/TypeAlias.ElementTree.mdx @@ -0,0 +1,23 @@ +{/* +* This file is generated by @lynx-js/tool-typedoc. +* Do not edit this file directly. +* @generated +*/} + +{/* Import all components as Lynx to allow dynamic lookup in TSDoc writings. */} +import * as Lynx from '@lynx'; + + +[lynx-testing-environment](/api/lynx-testing-environment/index.mdx) / ElementTree + +# Type Alias: ElementTree + +```ts +type ElementTree: ReturnType; +``` + +The lynx element tree + +## Defined in + +index.d.ts:17 diff --git a/docs/en/api/lynx-testing-environment/TypeAlias.ElementTreeGlobals.mdx b/docs/en/api/lynx-testing-environment/TypeAlias.ElementTreeGlobals.mdx new file mode 100644 index 000000000..779457bc4 --- /dev/null +++ b/docs/en/api/lynx-testing-environment/TypeAlias.ElementTreeGlobals.mdx @@ -0,0 +1,23 @@ +{/* +* This file is generated by @lynx-js/tool-typedoc. +* Do not edit this file directly. +* @generated +*/} + +{/* Import all components as Lynx to allow dynamic lookup in TSDoc writings. */} +import * as Lynx from '@lynx'; + + +[lynx-testing-environment](/api/lynx-testing-environment/index.mdx) / ElementTreeGlobals + +# Type Alias: ElementTreeGlobals + +```ts +type ElementTreeGlobals: PickUnderscoreKeys; +``` + +The Element PAPI Types + +## Defined in + +index.d.ts:32 diff --git a/docs/en/api/lynx-testing-environment/TypeAlias.FilterUnderscoreKeys.mdx b/docs/en/api/lynx-testing-environment/TypeAlias.FilterUnderscoreKeys.mdx new file mode 100644 index 000000000..1ac64c03a --- /dev/null +++ b/docs/en/api/lynx-testing-environment/TypeAlias.FilterUnderscoreKeys.mdx @@ -0,0 +1,27 @@ +{/* +* This file is generated by @lynx-js/tool-typedoc. +* Do not edit this file directly. +* @generated +*/} + +{/* Import all components as Lynx to allow dynamic lookup in TSDoc writings. */} +import * as Lynx from '@lynx'; + + +[lynx-testing-environment](/api/lynx-testing-environment/index.mdx) / FilterUnderscoreKeys + +# Type Alias: FilterUnderscoreKeys\ + +```ts +type FilterUnderscoreKeys: { [K in keyof T]: K extends `__${string}` ? K : never }[keyof T]; +``` + +## Type Parameters + +| Type Parameter | +| ------ | +| `T` | + +## Defined in + +index.d.ts:21 diff --git a/docs/en/api/lynx-testing-environment/TypeAlias.PickUnderscoreKeys.mdx b/docs/en/api/lynx-testing-environment/TypeAlias.PickUnderscoreKeys.mdx new file mode 100644 index 000000000..6d9cbd582 --- /dev/null +++ b/docs/en/api/lynx-testing-environment/TypeAlias.PickUnderscoreKeys.mdx @@ -0,0 +1,27 @@ +{/* +* This file is generated by @lynx-js/tool-typedoc. +* Do not edit this file directly. +* @generated +*/} + +{/* Import all components as Lynx to allow dynamic lookup in TSDoc writings. */} +import * as Lynx from '@lynx'; + + +[lynx-testing-environment](/api/lynx-testing-environment/index.mdx) / PickUnderscoreKeys + +# Type Alias: PickUnderscoreKeys\ + +```ts +type PickUnderscoreKeys: Pick>; +``` + +## Type Parameters + +| Type Parameter | +| ------ | +| `T` | + +## Defined in + +index.d.ts:27 diff --git a/docs/en/api/lynx-testing-environment/index.mdx b/docs/en/api/lynx-testing-environment/index.mdx new file mode 100644 index 000000000..5bfdd66fe --- /dev/null +++ b/docs/en/api/lynx-testing-environment/index.mdx @@ -0,0 +1,113 @@ +{/* +* This file is generated by @lynx-js/tool-typedoc. +* Do not edit this file directly. +* @generated +*/} + +{/* Import all components as Lynx to allow dynamic lookup in TSDoc writings. */} +import * as Lynx from '@lynx'; + + +# @lynx-js/testing-environment + +`@lynx-js/testing-environment` is a pure-JavaScript implementation of the [Lynx Spec](https://lynxjs.org/api/engine/element-api), notably the [Element PAPI](https://lynxjs.org/api/engine/element-api) and [Dual-threaded Model](https://lynxjs.org/guide/spec#dual-threaded-model) for use with Node.js. In general, the goal of the project is to emulate enough of a subset of a Lynx environment to be useful for testing. + +The Element PAPI implementation is based on jsdom, for example `__CreateElement` will return a `LynxElement`, which extends `HTMLElement` from jsdom. You can reuse the testing utilities that are commonly used for DOM testing, such as [`@testing-library/dom`](https://github.com/testing-library/dom-testing-library) (for DOM querying) and [`@testing-library/jest-dom`](https://github.com/testing-library/jest-dom) (custom jest matchers for the DOM), etc. + +## Usage + +```js +import { LynxTestingEnv } from '@lynx-js/testing-environment'; + +const lynxTestingEnv = new LynxTestingEnv(); +``` + +To use `@lynx-js/testing-environment`, you will primarily use the `LynxTestingEnv` constructor, which is a named export of the package. You will get back a `LynxTestingEnv` instance, which has a number of methods of useful properties, notably `switchToMainThread` and `switchToBackgroundThread`, which allow you to switch between the main thread and background thread. + +Use the background thread API: + +```js +lynxTestingEnv.switchToBackgroundThread(); +// use the background thread global object +globalThis.lynxCoreInject.tt.OnLifecycleEvent(...args); +// or directly use `lynxCoreInject` since it's already injected to `globalThis` +// lynxCoreInject.tt.OnLifecycleEvent(...args); +``` + +Use the main thread API: + +```js +lynxTestingEnv.switchToMainThread(); +// use the main thread Element PAPI +const page = __CreatePage('0', 0); +const view = __CreateView(0); +__AppendElement(page, view); +``` + +Note that you can still access the other thread's globals without switching threads: + +```js +lynxTestingEnv.switchToMainThread(); +// use the `backgroundThread` global object even though we're on the main thread +lynxTestingEnv.backgroundThread.tt.OnLifecycleEvent(...args); +``` + +### Use in Vitest + +It is recommended to configure as Vitest's [test environment](https://vitest.dev/guide/environment), for example: + +```js +// vitest.config.js +import { defineConfig } from 'vitest/config'; + +export default defineConfig({ + test: { + environment: require.resolve( + '@lynx-js/testing-environment/env/vitest', + ), + }, +}); +``` + +After configuration, you can directly access the `lynxTestingEnv` object globally in the test. + +If you want to use `@lynx-js/testing-environment` for unit testing in ReactLynx, you usually don't need to specify this configuration manually. + +Please refer to [ReactLynx Testing Library](https://lynxjs.org/react/react-lynx-testing-library.html) to inherit the configuration from `@lynx-js/react/testing-library`. + +## Credits + +Thanks to: + +- [jsdom](https://github.com/jsdom/jsdom) for the pure-JavaScript implementation of DOM API. + +A pure-JavaScript implementation of the [Lynx Spec](https://lynxjs.org/guide/spec.html), +notably the [Element PAPI](https://lynxjs.org/api/engine/element-api) and [Dual-threaded Model](https://lynxjs.org/guide/spec#dual-threaded-model) for use with Node.js. + +## Classes + +| Class | Description | +| ------ | ------ | +| [LynxTestingEnv](/api/lynx-testing-environment/Class.LynxTestingEnv.mdx) | A pure-JavaScript implementation of the [Lynx Spec](https://lynxjs.org/guide/spec.html), notably the [Element PAPI](https://lynxjs.org/api/engine/element-api) and [Dual-threaded Model](https://lynxjs.org/guide/spec#dual-threaded-model) for use with Node.js. | + +## Interfaces + +| Interface | Description | +| ------ | ------ | +| [LynxElement](/api/lynx-testing-environment/Interface.LynxElement.mdx) | Any Lynx Element, such as `view`, `text`, `image`, etc. | +| [LynxGlobalThis](/api/lynx-testing-environment/Interface.LynxGlobalThis.mdx) | The `globalThis` object of Lynx dual thread environment. | + +## Type Aliases + +| Type alias | Description | +| ------ | ------ | +| [ElementTree](/api/lynx-testing-environment/TypeAlias.ElementTree.mdx) | The lynx element tree | +| [ElementTreeGlobals](/api/lynx-testing-environment/TypeAlias.ElementTreeGlobals.mdx) | The Element PAPI Types | +| [FilterUnderscoreKeys](/api/lynx-testing-environment/TypeAlias.FilterUnderscoreKeys.mdx) | - | +| [PickUnderscoreKeys](/api/lynx-testing-environment/TypeAlias.PickUnderscoreKeys.mdx) | - | + +## Functions + +| Function | Description | +| ------ | ------ | +| [initElementTree](/api/lynx-testing-environment/Function.initElementTree.mdx) | - | diff --git a/docs/en/api/react-lynx-testing-library/index.md b/docs/en/api/react-lynx-testing-library/index.md deleted file mode 100644 index 064deab0a..000000000 --- a/docs/en/api/react-lynx-testing-library/index.md +++ /dev/null @@ -1,11 +0,0 @@ - - -[Home](./index.md) - -## API Reference - -## Packages - -| Package | Description | -| ----------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| [@lynx-js/react/testing-library](./react-lynx-testing-library.md) |

ReactLynx Testing Library is a simple and complete ReactLynx unit testing library that encourages good testing practices.

Inspired by [React Testing Library](https://testing-library.com/docs/react-testing-library/intro) and [jsdom](https://github.com/jsdom/jsdom).

| diff --git a/docs/en/api/react-lynx-testing-library/react-lynx-testing-library.cleanup.md b/docs/en/api/react-lynx-testing-library/react-lynx-testing-library.cleanup.md deleted file mode 100644 index fa2a6b07f..000000000 --- a/docs/en/api/react-lynx-testing-library/react-lynx-testing-library.cleanup.md +++ /dev/null @@ -1,17 +0,0 @@ - - -[Home](./index.md) > [@lynx-js/react/testing-library](./react-lynx-testing-library.md) > [cleanup](./react-lynx-testing-library.cleanup.md) - -## cleanup() function - -Cleanup elements rendered to the page and Preact trees that were mounted with render. - -**Signature:** - -```typescript -export function cleanup(): void; -``` - -**Returns:** - -void diff --git a/docs/en/api/react-lynx-testing-library/react-lynx-testing-library.md b/docs/en/api/react-lynx-testing-library/react-lynx-testing-library.md deleted file mode 100644 index 4fca09bbe..000000000 --- a/docs/en/api/react-lynx-testing-library/react-lynx-testing-library.md +++ /dev/null @@ -1,32 +0,0 @@ - - -[Home](./index.md) > [@lynx-js/react/testing-library](./react-lynx-testing-library.md) - -## react-lynx-testing-library package - -ReactLynx Testing Library is a simple and complete ReactLynx unit testing library that encourages good testing practices. - -Inspired by [React Testing Library](https://testing-library.com/docs/react-testing-library/intro) and [jsdom](https://github.com/jsdom/jsdom). - -## Functions - -| Function | Description | -| ------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------- | -| [cleanup()](./react-lynx-testing-library.cleanup.md) | Cleanup elements rendered to the page and Preact trees that were mounted with render. | -| [render(ui, options)](./react-lynx-testing-library.render.md) | Render into the page. It should be used with cleanup. | -| [renderHook(render, options)](./react-lynx-testing-library.renderhook.md) | Allows you to render a hook within a test React component without having to create that component yourself. | -| [waitSchedule()](./react-lynx-testing-library.waitschedule.md) |

Wait for the next event loop.

It will be useful when you want to wait for the next event loop to finish.

| - -## Interfaces - -| Interface | Description | -| ---------------------------------------------------------------------- | --------------------------------------------------------------------------- | -| [RenderHookOptions](./react-lynx-testing-library.renderhookoptions.md) | The options for [renderHook()](./react-lynx-testing-library.renderhook.md) | -| [RenderHookResult](./react-lynx-testing-library.renderhookresult.md) | The result of [renderHook()](./react-lynx-testing-library.renderhook.md) | -| [RenderOptions](./react-lynx-testing-library.renderoptions.md) | The options for [render()](./react-lynx-testing-library.render.md). | - -## Type Aliases - -| Type Alias | Description | -| ------------------------------------------------------------ | ---------------------------------------------------------------- | -| [RenderResult](./react-lynx-testing-library.renderresult.md) | The result of [render()](./react-lynx-testing-library.render.md) | diff --git a/docs/en/api/react-lynx-testing-library/react-lynx-testing-library.render.md b/docs/en/api/react-lynx-testing-library/react-lynx-testing-library.render.md deleted file mode 100644 index d0083d436..000000000 --- a/docs/en/api/react-lynx-testing-library/react-lynx-testing-library.render.md +++ /dev/null @@ -1,54 +0,0 @@ - - -[Home](./index.md) > [@lynx-js/react/testing-library](./react-lynx-testing-library.md) > [render](./react-lynx-testing-library.render.md) - -## render() function - -Render into the page. It should be used with cleanup. - -**Signature:** - -```typescript -export function render( - ui: ComponentChild, - options?: RenderOptions, -): RenderResult; -``` - -## Parameters - -| Parameter | Type | Description | -| --------- | ------------------------------------------------------------------------------- | ------------ | -| ui | ComponentChild | | -| options | [RenderOptions](./react-lynx-testing-library.renderoptions.md)<Q> | _(Optional)_ | - -**Returns:** - -[RenderResult](./react-lynx-testing-library.renderresult.md)<Q> - -## Example - -```ts -import { render} from '@lynx-js/react/testing-library' - -const WrapperComponent = ({ children }) => ( - {children} -); -const Comp = () => { - return ; -}; -const { container, getByTestId } = render(, { - wrapper: WrapperComponent, -}); -expect(getByTestId('wrapper')).toBeInTheDocument(); -expect(container.firstChild).toMatchInlineSnapshot(` - - - -`); -``` diff --git a/docs/en/api/react-lynx-testing-library/react-lynx-testing-library.renderhook.md b/docs/en/api/react-lynx-testing-library/react-lynx-testing-library.renderhook.md deleted file mode 100644 index f7613903b..000000000 --- a/docs/en/api/react-lynx-testing-library/react-lynx-testing-library.renderhook.md +++ /dev/null @@ -1,48 +0,0 @@ - - -[Home](./index.md) > [@lynx-js/react/testing-library](./react-lynx-testing-library.md) > [renderHook](./react-lynx-testing-library.renderhook.md) - -## renderHook() function - -Allows you to render a hook within a test React component without having to create that component yourself. - -**Signature:** - -```typescript -export function renderHook( - render: (initialProps: Props) => Result, - options?: RenderHookOptions, -): RenderHookResult; -``` - -## Parameters - -| Parameter | Type | Description | -| --------- | ------------------------------------------------------------------------------------------- | ------------ | -| render | (initialProps: Props) => Result | | -| options | [RenderHookOptions](./react-lynx-testing-library.renderhookoptions.md)<Props> | _(Optional)_ | - -**Returns:** - -[RenderHookResult](./react-lynx-testing-library.renderhookresult.md)<Result, Props> - -## Example - -```ts -import { renderHook } from '@lynx-js/react/testing-library' - -const Context = createContext('default'); -function Wrapper({ children }) { - return {children}; -} -const { result } = renderHook( - () => { - return useContext(Context); - }, - { - wrapper: Wrapper, - }, -); - -expect(result.current).toEqual('provided'); -``` diff --git a/docs/en/api/react-lynx-testing-library/react-lynx-testing-library.renderhookoptions.initialprops.md b/docs/en/api/react-lynx-testing-library/react-lynx-testing-library.renderhookoptions.initialprops.md deleted file mode 100644 index 78e281b6c..000000000 --- a/docs/en/api/react-lynx-testing-library/react-lynx-testing-library.renderhookoptions.initialprops.md +++ /dev/null @@ -1,13 +0,0 @@ - - -[Home](./index.md) > [@lynx-js/react/testing-library](./react-lynx-testing-library.md) > [RenderHookOptions](./react-lynx-testing-library.renderhookoptions.md) > [initialProps](./react-lynx-testing-library.renderhookoptions.initialprops.md) - -## RenderHookOptions.initialProps property - -The argument passed to the renderHook callback. Can be useful if you plan to use the rerender utility to change the values passed to your hook. - -**Signature:** - -```typescript -initialProps?: Props; -``` diff --git a/docs/en/api/react-lynx-testing-library/react-lynx-testing-library.renderhookoptions.md b/docs/en/api/react-lynx-testing-library/react-lynx-testing-library.renderhookoptions.md deleted file mode 100644 index ccb210d02..000000000 --- a/docs/en/api/react-lynx-testing-library/react-lynx-testing-library.renderhookoptions.md +++ /dev/null @@ -1,20 +0,0 @@ - - -[Home](./index.md) > [@lynx-js/react/testing-library](./react-lynx-testing-library.md) > [RenderHookOptions](./react-lynx-testing-library.renderhookoptions.md) - -## RenderHookOptions interface - -The options for [renderHook()](./react-lynx-testing-library.renderhook.md) - -**Signature:** - -```typescript -export interface RenderHookOptions -``` - -## Properties - -| Property | Modifiers | Type | Description | -| ------------------------------------------------------------------------------- | --------- | ---------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| [initialProps?](./react-lynx-testing-library.renderhookoptions.initialprops.md) | | Props | _(Optional)_ The argument passed to the renderHook callback. Can be useful if you plan to use the rerender utility to change the values passed to your hook. | -| [wrapper?](./react-lynx-testing-library.renderhookoptions.wrapper.md) | | ComponentType<{ children: LynxElement }> | _(Optional)_ Pass a React Component as the wrapper option to have it rendered around the inner element. This is most useful for creating reusable custom render functions for common data providers. See setup for examples. | diff --git a/docs/en/api/react-lynx-testing-library/react-lynx-testing-library.renderhookoptions.wrapper.md b/docs/en/api/react-lynx-testing-library/react-lynx-testing-library.renderhookoptions.wrapper.md deleted file mode 100644 index 0d24d0fd8..000000000 --- a/docs/en/api/react-lynx-testing-library/react-lynx-testing-library.renderhookoptions.wrapper.md +++ /dev/null @@ -1,41 +0,0 @@ - - -[Home](./index.md) > [@lynx-js/react/testing-library](./react-lynx-testing-library.md) > [RenderHookOptions](./react-lynx-testing-library.renderhookoptions.md) > [wrapper](./react-lynx-testing-library.renderhookoptions.wrapper.md) - -## RenderHookOptions.wrapper property - -Pass a React Component as the wrapper option to have it rendered around the inner element. This is most useful for creating reusable custom render functions for common data providers. See setup for examples. - -**Signature:** - -```typescript -wrapper?: ComponentType<{ children: LynxElement }>; -``` - -## Example - -```ts -import { renderHook } from '@lynx-js/react/testing-library' -import { ThemeProvider } from 'my-ui-lib' -import { TranslationProvider } from 'my-i18n-lib' -import defaultStrings from 'i18n/en-x-default' - -const AllTheProviders = ({children}) => { - return ( - - - {children} - - - ) -} - -const customRenderHook = (ui, options) => - renderHook(ui, { wrapper: AllTheProviders, ...options }) - -// re-export everything -export * from '@lynx-js/react/testing-library' - -// override renderHook method -export { customRender as renderHook } -``` diff --git a/docs/en/api/react-lynx-testing-library/react-lynx-testing-library.renderhookresult.md b/docs/en/api/react-lynx-testing-library/react-lynx-testing-library.renderhookresult.md deleted file mode 100644 index 302b67f48..000000000 --- a/docs/en/api/react-lynx-testing-library/react-lynx-testing-library.renderhookresult.md +++ /dev/null @@ -1,21 +0,0 @@ - - -[Home](./index.md) > [@lynx-js/react/testing-library](./react-lynx-testing-library.md) > [RenderHookResult](./react-lynx-testing-library.renderhookresult.md) - -## RenderHookResult interface - -The result of [renderHook()](./react-lynx-testing-library.renderhook.md) - -**Signature:** - -```typescript -export interface RenderHookResult -``` - -## Properties - -| Property | Modifiers | Type | Description | -| --------------------------------------------------------------------- | --------- | -------------------------- | ------------------------------------------------------------------------------------------------------- | -| [rerender](./react-lynx-testing-library.renderhookresult.rerender.md) | | (props?: Props) => void | Triggers a re-render. The props will be passed to your renderHook callback. | -| [result](./react-lynx-testing-library.renderhookresult.result.md) | | { current: Result; } | This is a stable reference to the latest value returned by your renderHook callback | -| [unmount](./react-lynx-testing-library.renderhookresult.unmount.md) | | () => void | Unmounts the test component. This is useful for when you need to test any cleanup your useEffects have. | diff --git a/docs/en/api/react-lynx-testing-library/react-lynx-testing-library.renderhookresult.rerender.md b/docs/en/api/react-lynx-testing-library/react-lynx-testing-library.renderhookresult.rerender.md deleted file mode 100644 index e217d8bc1..000000000 --- a/docs/en/api/react-lynx-testing-library/react-lynx-testing-library.renderhookresult.rerender.md +++ /dev/null @@ -1,13 +0,0 @@ - - -[Home](./index.md) > [@lynx-js/react/testing-library](./react-lynx-testing-library.md) > [RenderHookResult](./react-lynx-testing-library.renderhookresult.md) > [rerender](./react-lynx-testing-library.renderhookresult.rerender.md) - -## RenderHookResult.rerender property - -Triggers a re-render. The props will be passed to your renderHook callback. - -**Signature:** - -```typescript -rerender: (props?: Props) => void; -``` diff --git a/docs/en/api/react-lynx-testing-library/react-lynx-testing-library.renderhookresult.result.md b/docs/en/api/react-lynx-testing-library/react-lynx-testing-library.renderhookresult.result.md deleted file mode 100644 index f92feecf2..000000000 --- a/docs/en/api/react-lynx-testing-library/react-lynx-testing-library.renderhookresult.result.md +++ /dev/null @@ -1,15 +0,0 @@ - - -[Home](./index.md) > [@lynx-js/react/testing-library](./react-lynx-testing-library.md) > [RenderHookResult](./react-lynx-testing-library.renderhookresult.md) > [result](./react-lynx-testing-library.renderhookresult.result.md) - -## RenderHookResult.result property - -This is a stable reference to the latest value returned by your renderHook callback - -**Signature:** - -```typescript -result: { - current: Result; -} -``` diff --git a/docs/en/api/react-lynx-testing-library/react-lynx-testing-library.renderhookresult.unmount.md b/docs/en/api/react-lynx-testing-library/react-lynx-testing-library.renderhookresult.unmount.md deleted file mode 100644 index 07b83a32a..000000000 --- a/docs/en/api/react-lynx-testing-library/react-lynx-testing-library.renderhookresult.unmount.md +++ /dev/null @@ -1,13 +0,0 @@ - - -[Home](./index.md) > [@lynx-js/react/testing-library](./react-lynx-testing-library.md) > [RenderHookResult](./react-lynx-testing-library.renderhookresult.md) > [unmount](./react-lynx-testing-library.renderhookresult.unmount.md) - -## RenderHookResult.unmount property - -Unmounts the test component. This is useful for when you need to test any cleanup your useEffects have. - -**Signature:** - -```typescript -unmount: () => void; -``` diff --git a/docs/en/api/react-lynx-testing-library/react-lynx-testing-library.renderoptions.enablebackgroundthread.md b/docs/en/api/react-lynx-testing-library/react-lynx-testing-library.renderoptions.enablebackgroundthread.md deleted file mode 100644 index 1c3ed2afe..000000000 --- a/docs/en/api/react-lynx-testing-library/react-lynx-testing-library.renderoptions.enablebackgroundthread.md +++ /dev/null @@ -1,15 +0,0 @@ - - -[Home](./index.md) > [@lynx-js/react/testing-library](./react-lynx-testing-library.md) > [RenderOptions](./react-lynx-testing-library.renderoptions.md) > [enableBackgroundThread](./react-lynx-testing-library.renderoptions.enablebackgroundthread.md) - -## RenderOptions.enableBackgroundThread property - -Render your component in the background thread or not. - -Note that all user code in the top level will be executed in the background thread by default. (eg. `__BACKGROUND__` is `true` in the top level) - -**Signature:** - -```typescript -enableBackgroundThread?: boolean; -``` diff --git a/docs/en/api/react-lynx-testing-library/react-lynx-testing-library.renderoptions.enablemainthread.md b/docs/en/api/react-lynx-testing-library/react-lynx-testing-library.renderoptions.enablemainthread.md deleted file mode 100644 index f304164aa..000000000 --- a/docs/en/api/react-lynx-testing-library/react-lynx-testing-library.renderoptions.enablemainthread.md +++ /dev/null @@ -1,15 +0,0 @@ - - -[Home](./index.md) > [@lynx-js/react/testing-library](./react-lynx-testing-library.md) > [RenderOptions](./react-lynx-testing-library.renderoptions.md) > [enableMainThread](./react-lynx-testing-library.renderoptions.enablemainthread.md) - -## RenderOptions.enableMainThread property - -Render your component in the main thread or not. - -It is recommended to use this option only when you need to test the [IFR](https://lynxjs.org/zh/guide/interaction/ifr.html) behavior. - -**Signature:** - -```typescript -enableMainThread?: boolean; -``` diff --git a/docs/en/api/react-lynx-testing-library/react-lynx-testing-library.renderoptions.md b/docs/en/api/react-lynx-testing-library/react-lynx-testing-library.renderoptions.md deleted file mode 100644 index 692bed148..000000000 --- a/docs/en/api/react-lynx-testing-library/react-lynx-testing-library.renderoptions.md +++ /dev/null @@ -1,22 +0,0 @@ - - -[Home](./index.md) > [@lynx-js/react/testing-library](./react-lynx-testing-library.md) > [RenderOptions](./react-lynx-testing-library.renderoptions.md) - -## RenderOptions interface - -The options for [render()](./react-lynx-testing-library.render.md). - -**Signature:** - -```typescript -export interface RenderOptions -``` - -## Properties - -| Property | Modifiers | Type | Description | -| ----------------------------------------------------------------------------------------------- | --------- | -------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| [enableBackgroundThread?](./react-lynx-testing-library.renderoptions.enablebackgroundthread.md) | | boolean |

_(Optional)_ Render your component in the background thread or not.

Note that all user code in the top level will be executed in the background thread by default. (eg. **BACKGROUND** is true in the top level)

| -| [enableMainThread?](./react-lynx-testing-library.renderoptions.enablemainthread.md) | | boolean |

_(Optional)_ Render your component in the main thread or not.

It is recommended to use this option only when you need to test the [IFR](https://lynxjs.org/zh/guide/interaction/ifr.html) behavior.

| -| [queries?](./react-lynx-testing-library.renderoptions.queries.md) | | Q | _(Optional)_ Queries to bind. Overrides the default set from DOM Testing Library unless merged. | -| [wrapper?](./react-lynx-testing-library.renderoptions.wrapper.md) | | ComponentChild | _(Optional)_ Pass a React Component as the wrapper option to have it rendered around the inner element. This is most useful for creating reusable custom render functions for common data providers. See setup for examples. | diff --git a/docs/en/api/react-lynx-testing-library/react-lynx-testing-library.renderoptions.queries.md b/docs/en/api/react-lynx-testing-library/react-lynx-testing-library.renderoptions.queries.md deleted file mode 100644 index bb9ba443c..000000000 --- a/docs/en/api/react-lynx-testing-library/react-lynx-testing-library.renderoptions.queries.md +++ /dev/null @@ -1,26 +0,0 @@ - - -[Home](./index.md) > [@lynx-js/react/testing-library](./react-lynx-testing-library.md) > [RenderOptions](./react-lynx-testing-library.renderoptions.md) > [queries](./react-lynx-testing-library.renderoptions.queries.md) - -## RenderOptions.queries property - -Queries to bind. Overrides the default set from DOM Testing Library unless merged. - -**Signature:** - -```typescript -queries?: Q; -``` - -## Example - -```ts -// Example, a function to traverse table contents -import * as tableQueries from 'my-table-query-library' -import { queries } from '@lynx-js/react/testing-library' - -const { getByRowColumn, getByText } = render(, { - queries: {...queries, ...tableQueries}, -}) - -``` diff --git a/docs/en/api/react-lynx-testing-library/react-lynx-testing-library.renderoptions.wrapper.md b/docs/en/api/react-lynx-testing-library/react-lynx-testing-library.renderoptions.wrapper.md deleted file mode 100644 index c3835ccd0..000000000 --- a/docs/en/api/react-lynx-testing-library/react-lynx-testing-library.renderoptions.wrapper.md +++ /dev/null @@ -1,41 +0,0 @@ - - -[Home](./index.md) > [@lynx-js/react/testing-library](./react-lynx-testing-library.md) > [RenderOptions](./react-lynx-testing-library.renderoptions.md) > [wrapper](./react-lynx-testing-library.renderoptions.wrapper.md) - -## RenderOptions.wrapper property - -Pass a React Component as the wrapper option to have it rendered around the inner element. This is most useful for creating reusable custom render functions for common data providers. See setup for examples. - -**Signature:** - -```typescript -wrapper?: ComponentChild; -``` - -## Example - -```ts -import { render } from '@lynx-js/react/testing-library' -import { ThemeProvider } from 'my-ui-lib' -import { TranslationProvider } from 'my-i18n-lib' -import defaultStrings from 'i18n/en-x-default' - -const AllTheProviders = ({children}) => { - return ( - - - {children} - - - ) -} - -const customRender = (ui, options) => - render(ui, { wrapper: AllTheProviders, ...options }) - -// re-export everything -export * from '@lynx-js/react/testing-library' - -// override render method -export { customRender as render } -``` diff --git a/docs/en/api/react-lynx-testing-library/react-lynx-testing-library.renderresult.md b/docs/en/api/react-lynx-testing-library/react-lynx-testing-library.renderresult.md deleted file mode 100644 index 58a1fecca..000000000 --- a/docs/en/api/react-lynx-testing-library/react-lynx-testing-library.renderresult.md +++ /dev/null @@ -1,17 +0,0 @@ - - -[Home](./index.md) > [@lynx-js/react/testing-library](./react-lynx-testing-library.md) > [RenderResult](./react-lynx-testing-library.renderresult.md) - -## RenderResult type - -The result of [render()](./react-lynx-testing-library.render.md) - -**Signature:** - -```typescript -export type RenderResult = { - container: LynxElement; - rerender: (ui: ComponentChild) => void; - unmount: () => boolean; -} & { [P in keyof Q]: BoundFunction }; -``` diff --git a/docs/en/api/react-lynx-testing-library/react-lynx-testing-library.waitschedule.md b/docs/en/api/react-lynx-testing-library/react-lynx-testing-library.waitschedule.md deleted file mode 100644 index 32b5e701b..000000000 --- a/docs/en/api/react-lynx-testing-library/react-lynx-testing-library.waitschedule.md +++ /dev/null @@ -1,19 +0,0 @@ - - -[Home](./index.md) > [@lynx-js/react/testing-library](./react-lynx-testing-library.md) > [waitSchedule](./react-lynx-testing-library.waitschedule.md) - -## waitSchedule() function - -Wait for the next event loop. - -It will be useful when you want to wait for the next event loop to finish. - -**Signature:** - -```typescript -export function waitSchedule(): Promise; -``` - -**Returns:** - -Promise<void> diff --git a/docs/en/api/reactlynx-testing-library/Class.LynxTestingEnv.mdx b/docs/en/api/reactlynx-testing-library/Class.LynxTestingEnv.mdx new file mode 100644 index 000000000..bf6a4052c --- /dev/null +++ b/docs/en/api/reactlynx-testing-library/Class.LynxTestingEnv.mdx @@ -0,0 +1,193 @@ +{/* +* This file is generated by @lynx-js/tool-typedoc. +* Do not edit this file directly. +* @generated +*/} + +{/* Import all components as Lynx to allow dynamic lookup in TSDoc writings. */} +import * as Lynx from '@lynx'; + + +[reactlynx-testing-library](/api/reactlynx-testing-library/index.mdx) / LynxTestingEnv + +# Class: LynxTestingEnv + +A pure-JavaScript implementation of the [Lynx Spec](https://lynxjs.org/guide/spec.html), +notably the [Element PAPI](https://lynxjs.org/api/engine/element-api) and [Dual-threaded Model](https://lynxjs.org/guide/spec#dual-threaded-model) for use with Node.js. + +## Example + +```ts +import { LynxTestingEnv } from '@lynx-js/testing-environment'; + +const lynxTestingEnv = new LynxTestingEnv(); + +lynxTestingEnv.switchToMainThread(); +// use the main thread Element PAPI +const page = __CreatePage('0', 0); +const view = __CreateView(0); +__AppendElement(page, view); + +``` + +## Constructors + +### new LynxTestingEnv() + +```ts +new LynxTestingEnv(): LynxTestingEnv +``` + +#### Returns + +[`LynxTestingEnv`](/api/reactlynx-testing-library/Class.LynxTestingEnv.mdx) + +#### Defined in + +index.d.ts:892 + +## Properties + +### backgroundThread + +```ts +backgroundThread: LynxGlobalThis; +``` + +The global object for the background thread. + +#### Example + +```ts +import { LynxTestingEnv } from '@lynx-js/testing-environment'; + +const lynxTestingEnv = new LynxTestingEnv(); + +lynxTestingEnv.switchToBackgroundThread(); +// use the background thread global object +globalThis.lynxCoreInject.tt.OnLifecycleEvent(...args); +``` + +#### Defined in + +index.d.ts:872 + +*** + +### jsdom + +```ts +jsdom: JSDOM; +``` + +#### Defined in + +index.d.ts:891 + +*** + +### mainThread + +```ts +mainThread: LynxGlobalThis & ElementTreeGlobals; +``` + +The global object for the main thread. + +#### Example + +```ts +import { LynxTestingEnv } from '@lynx-js/testing-environment'; + +const lynxTestingEnv = new LynxTestingEnv(); + +lynxTestingEnv.switchToMainThread(); +// use the main thread global object +const page = globalThis.__CreatePage('0', 0); +const view = globalThis.__CreateView(0); +globalThis.__AppendElement(page, view); +``` + +#### Defined in + +index.d.ts:890 + +## Methods + +### clearGlobal() + +```ts +clearGlobal(): void +``` + +#### Returns + +`void` + +#### Defined in + +index.d.ts:896 + +*** + +### injectGlobals() + +```ts +injectGlobals(): void +``` + +#### Returns + +`void` + +#### Defined in + +index.d.ts:893 + +*** + +### reset() + +```ts +reset(): void +``` + +#### Returns + +`void` + +#### Defined in + +index.d.ts:897 + +*** + +### switchToBackgroundThread() + +```ts +switchToBackgroundThread(): void +``` + +#### Returns + +`void` + +#### Defined in + +index.d.ts:894 + +*** + +### switchToMainThread() + +```ts +switchToMainThread(): void +``` + +#### Returns + +`void` + +#### Defined in + +index.d.ts:895 diff --git a/docs/en/api/reactlynx-testing-library/Function.buildQueries.mdx b/docs/en/api/reactlynx-testing-library/Function.buildQueries.mdx new file mode 100644 index 000000000..465ff7d5f --- /dev/null +++ b/docs/en/api/reactlynx-testing-library/Function.buildQueries.mdx @@ -0,0 +1,42 @@ +{/* +* This file is generated by @lynx-js/tool-typedoc. +* Do not edit this file directly. +* @generated +*/} + +{/* Import all components as Lynx to allow dynamic lookup in TSDoc writings. */} +import * as Lynx from '@lynx'; + + +[reactlynx-testing-library](/api/reactlynx-testing-library/index.mdx) / buildQueries + +# Function: buildQueries() + +```ts +function buildQueries( + queryAllBy: GetAllBy, + getMultipleError: GetErrorFunction, +getMissingError: GetErrorFunction): BuiltQueryMethods +``` + +## Type Parameters + +| Type Parameter | +| ------ | +| `Arguments` *extends* `any`[] | + +## Parameters + +| Parameter | Type | +| ------ | ------ | +| `queryAllBy` | [`GetAllBy`](/api/reactlynx-testing-library/TypeAlias.GetAllBy.mdx)\<`Arguments`\> | +| `getMultipleError` | [`GetErrorFunction`](/api/reactlynx-testing-library/TypeAlias.GetErrorFunction.mdx)\<`Arguments`\> | +| `getMissingError` | [`GetErrorFunction`](/api/reactlynx-testing-library/TypeAlias.GetErrorFunction.mdx)\<`Arguments`\> | + +## Returns + +[`BuiltQueryMethods`](/api/reactlynx-testing-library/TypeAlias.BuiltQueryMethods.mdx)\<`Arguments`\> + +## Defined in + +index.d.ts:193 diff --git a/docs/en/api/reactlynx-testing-library/Function.cleanup.mdx b/docs/en/api/reactlynx-testing-library/Function.cleanup.mdx new file mode 100644 index 000000000..298f3c54d --- /dev/null +++ b/docs/en/api/reactlynx-testing-library/Function.cleanup.mdx @@ -0,0 +1,27 @@ +{/* +* This file is generated by @lynx-js/tool-typedoc. +* Do not edit this file directly. +* @generated +*/} + +{/* Import all components as Lynx to allow dynamic lookup in TSDoc writings. */} +import * as Lynx from '@lynx'; + + +[reactlynx-testing-library](/api/reactlynx-testing-library/index.mdx) / cleanup + +# Function: cleanup() + +```ts +function cleanup(): void +``` + +Cleanup elements rendered to the page and Preact trees that were mounted with render. + +## Returns + +`void` + +## Defined in + +index.d.ts:285 diff --git a/docs/en/api/reactlynx-testing-library/Function.computeHeadingLevel.mdx b/docs/en/api/reactlynx-testing-library/Function.computeHeadingLevel.mdx new file mode 100644 index 000000000..f835e64b2 --- /dev/null +++ b/docs/en/api/reactlynx-testing-library/Function.computeHeadingLevel.mdx @@ -0,0 +1,31 @@ +{/* +* This file is generated by @lynx-js/tool-typedoc. +* Do not edit this file directly. +* @generated +*/} + +{/* Import all components as Lynx to allow dynamic lookup in TSDoc writings. */} +import * as Lynx from '@lynx'; + + +[reactlynx-testing-library](/api/reactlynx-testing-library/index.mdx) / computeHeadingLevel + +# Function: computeHeadingLevel() + +```ts +function computeHeadingLevel(element: Element): number | undefined +``` + +## Parameters + +| Parameter | Type | +| ------ | ------ | +| `element` | `Element` | + +## Returns + +`number` \| `undefined` + +## Defined in + +index.d.ts:287 diff --git a/docs/en/api/reactlynx-testing-library/Function.configure.mdx b/docs/en/api/reactlynx-testing-library/Function.configure.mdx new file mode 100644 index 000000000..8ee5fb495 --- /dev/null +++ b/docs/en/api/reactlynx-testing-library/Function.configure.mdx @@ -0,0 +1,31 @@ +{/* +* This file is generated by @lynx-js/tool-typedoc. +* Do not edit this file directly. +* @generated +*/} + +{/* Import all components as Lynx to allow dynamic lookup in TSDoc writings. */} +import * as Lynx from '@lynx'; + + +[reactlynx-testing-library](/api/reactlynx-testing-library/index.mdx) / configure + +# Function: configure() + +```ts +function configure(configDelta: ConfigFn | Partial): void +``` + +## Parameters + +| Parameter | Type | +| ------ | ------ | +| `configDelta` | [`ConfigFn`](/api/reactlynx-testing-library/Interface.ConfigFn.mdx) \| `Partial`\<[`Config`](/api/reactlynx-testing-library/Interface.Config.mdx)\> | + +## Returns + +`void` + +## Defined in + +index.d.ts:314 diff --git a/docs/en/api/reactlynx-testing-library/Function.createEvent.mdx b/docs/en/api/reactlynx-testing-library/Function.createEvent.mdx new file mode 100644 index 000000000..1c3f5b165 --- /dev/null +++ b/docs/en/api/reactlynx-testing-library/Function.createEvent.mdx @@ -0,0 +1,40 @@ +{/* +* This file is generated by @lynx-js/tool-typedoc. +* Do not edit this file directly. +* @generated +*/} + +{/* Import all components as Lynx to allow dynamic lookup in TSDoc writings. */} +import * as Lynx from '@lynx'; + + +[reactlynx-testing-library](/api/reactlynx-testing-library/index.mdx) / createEvent + +# Function: createEvent() + +```ts +function createEvent( + eventName: string, + node: any, + init?: object, + options?: object): Event +``` + +## Parameters + +| Parameter | Type | +| ------ | ------ | +| `eventName` | `string` | +| `node` | `any` | +| `init`? | `object` | +| `options`? | `object` | +| `options.defaultInit`? | `object` | +| `options.EventType`? | `string` | + +## Returns + +`Event` + +## Defined in + +index.d.ts:316 diff --git a/docs/en/api/reactlynx-testing-library/Function.findAllByAltText.mdx b/docs/en/api/reactlynx-testing-library/Function.findAllByAltText.mdx new file mode 100644 index 000000000..294ff91af --- /dev/null +++ b/docs/en/api/reactlynx-testing-library/Function.findAllByAltText.mdx @@ -0,0 +1,37 @@ +{/* +* This file is generated by @lynx-js/tool-typedoc. +* Do not edit this file directly. +* @generated +*/} + +{/* Import all components as Lynx to allow dynamic lookup in TSDoc writings. */} +import * as Lynx from '@lynx'; + + +[reactlynx-testing-library](/api/reactlynx-testing-library/index.mdx) / findAllByAltText + +# Function: findAllByAltText() + +```ts +function findAllByAltText(...args: [HTMLElement, Matcher, MatcherOptions, waitForOptions]): ReturnType> +``` + +## Type Parameters + +| Type Parameter | Default type | +| ------ | ------ | +| `T` *extends* `HTMLElement` | `HTMLElement` | + +## Parameters + +| Parameter | Type | +| ------ | ------ | +| ...`args` | [`HTMLElement`, [`Matcher`](/api/reactlynx-testing-library/TypeAlias.Matcher.mdx), [`MatcherOptions`](/api/reactlynx-testing-library/Interface.MatcherOptions.mdx), [`waitForOptions`](/api/reactlynx-testing-library/Interface.waitForOptions.mdx)] | + +## Returns + +`ReturnType`\<[`FindAllByBoundAttribute`](/api/reactlynx-testing-library/TypeAlias.FindAllByBoundAttribute.mdx)\<`T`\>\> + +## Defined in + +index.d.ts:454 diff --git a/docs/en/api/reactlynx-testing-library/Function.findAllByDisplayValue.mdx b/docs/en/api/reactlynx-testing-library/Function.findAllByDisplayValue.mdx new file mode 100644 index 000000000..e4748082e --- /dev/null +++ b/docs/en/api/reactlynx-testing-library/Function.findAllByDisplayValue.mdx @@ -0,0 +1,37 @@ +{/* +* This file is generated by @lynx-js/tool-typedoc. +* Do not edit this file directly. +* @generated +*/} + +{/* Import all components as Lynx to allow dynamic lookup in TSDoc writings. */} +import * as Lynx from '@lynx'; + + +[reactlynx-testing-library](/api/reactlynx-testing-library/index.mdx) / findAllByDisplayValue + +# Function: findAllByDisplayValue() + +```ts +function findAllByDisplayValue(...args: [HTMLElement, Matcher, MatcherOptions, waitForOptions]): ReturnType> +``` + +## Type Parameters + +| Type Parameter | Default type | +| ------ | ------ | +| `T` *extends* `HTMLElement` | `HTMLElement` | + +## Parameters + +| Parameter | Type | +| ------ | ------ | +| ...`args` | [`HTMLElement`, [`Matcher`](/api/reactlynx-testing-library/TypeAlias.Matcher.mdx), [`MatcherOptions`](/api/reactlynx-testing-library/Interface.MatcherOptions.mdx), [`waitForOptions`](/api/reactlynx-testing-library/Interface.waitForOptions.mdx)] | + +## Returns + +`ReturnType`\<[`FindAllByBoundAttribute`](/api/reactlynx-testing-library/TypeAlias.FindAllByBoundAttribute.mdx)\<`T`\>\> + +## Defined in + +index.d.ts:465 diff --git a/docs/en/api/reactlynx-testing-library/Function.findAllByLabelText.mdx b/docs/en/api/reactlynx-testing-library/Function.findAllByLabelText.mdx new file mode 100644 index 000000000..aca921037 --- /dev/null +++ b/docs/en/api/reactlynx-testing-library/Function.findAllByLabelText.mdx @@ -0,0 +1,37 @@ +{/* +* This file is generated by @lynx-js/tool-typedoc. +* Do not edit this file directly. +* @generated +*/} + +{/* Import all components as Lynx to allow dynamic lookup in TSDoc writings. */} +import * as Lynx from '@lynx'; + + +[reactlynx-testing-library](/api/reactlynx-testing-library/index.mdx) / findAllByLabelText + +# Function: findAllByLabelText() + +```ts +function findAllByLabelText(...args: [HTMLElement, Matcher, SelectorMatcherOptions, waitForOptions]): ReturnType> +``` + +## Type Parameters + +| Type Parameter | Default type | +| ------ | ------ | +| `T` *extends* `HTMLElement` | `HTMLElement` | + +## Parameters + +| Parameter | Type | +| ------ | ------ | +| ...`args` | [`HTMLElement`, [`Matcher`](/api/reactlynx-testing-library/TypeAlias.Matcher.mdx), [`SelectorMatcherOptions`](/api/reactlynx-testing-library/queryHelpers.Interface.SelectorMatcherOptions.mdx), [`waitForOptions`](/api/reactlynx-testing-library/Interface.waitForOptions.mdx)] | + +## Returns + +`ReturnType`\<[`FindAllByText`](/api/reactlynx-testing-library/TypeAlias.FindAllByText.mdx)\<`T`\>\> + +## Defined in + +index.d.ts:469 diff --git a/docs/en/api/reactlynx-testing-library/Function.findAllByPlaceholderText.mdx b/docs/en/api/reactlynx-testing-library/Function.findAllByPlaceholderText.mdx new file mode 100644 index 000000000..754d5be87 --- /dev/null +++ b/docs/en/api/reactlynx-testing-library/Function.findAllByPlaceholderText.mdx @@ -0,0 +1,37 @@ +{/* +* This file is generated by @lynx-js/tool-typedoc. +* Do not edit this file directly. +* @generated +*/} + +{/* Import all components as Lynx to allow dynamic lookup in TSDoc writings. */} +import * as Lynx from '@lynx'; + + +[reactlynx-testing-library](/api/reactlynx-testing-library/index.mdx) / findAllByPlaceholderText + +# Function: findAllByPlaceholderText() + +```ts +function findAllByPlaceholderText(...args: [HTMLElement, Matcher, MatcherOptions, waitForOptions]): ReturnType> +``` + +## Type Parameters + +| Type Parameter | Default type | +| ------ | ------ | +| `T` *extends* `HTMLElement` | `HTMLElement` | + +## Parameters + +| Parameter | Type | +| ------ | ------ | +| ...`args` | [`HTMLElement`, [`Matcher`](/api/reactlynx-testing-library/TypeAlias.Matcher.mdx), [`MatcherOptions`](/api/reactlynx-testing-library/Interface.MatcherOptions.mdx), [`waitForOptions`](/api/reactlynx-testing-library/Interface.waitForOptions.mdx)] | + +## Returns + +`ReturnType`\<[`FindAllByBoundAttribute`](/api/reactlynx-testing-library/TypeAlias.FindAllByBoundAttribute.mdx)\<`T`\>\> + +## Defined in + +index.d.ts:473 diff --git a/docs/en/api/reactlynx-testing-library/Function.findAllByRole.mdx b/docs/en/api/reactlynx-testing-library/Function.findAllByRole.mdx new file mode 100644 index 000000000..da9a366d9 --- /dev/null +++ b/docs/en/api/reactlynx-testing-library/Function.findAllByRole.mdx @@ -0,0 +1,37 @@ +{/* +* This file is generated by @lynx-js/tool-typedoc. +* Do not edit this file directly. +* @generated +*/} + +{/* Import all components as Lynx to allow dynamic lookup in TSDoc writings. */} +import * as Lynx from '@lynx'; + + +[reactlynx-testing-library](/api/reactlynx-testing-library/index.mdx) / findAllByRole + +# Function: findAllByRole() + +```ts +function findAllByRole(...args: [HTMLElement, any, ByRoleOptions, waitForOptions]): ReturnType> +``` + +## Type Parameters + +| Type Parameter | Default type | +| ------ | ------ | +| `T` *extends* `HTMLElement` | `HTMLElement` | + +## Parameters + +| Parameter | Type | +| ------ | ------ | +| ...`args` | [`HTMLElement`, `any`, [`ByRoleOptions`](/api/reactlynx-testing-library/Interface.ByRoleOptions.mdx), [`waitForOptions`](/api/reactlynx-testing-library/Interface.waitForOptions.mdx)] | + +## Returns + +`ReturnType`\<[`FindAllByRole`](/api/reactlynx-testing-library/TypeAlias.FindAllByRole.mdx)\<`T`\>\> + +## Defined in + +index.d.ts:484 diff --git a/docs/en/api/reactlynx-testing-library/Function.findAllByTestId.mdx b/docs/en/api/reactlynx-testing-library/Function.findAllByTestId.mdx new file mode 100644 index 000000000..fd8f8f24d --- /dev/null +++ b/docs/en/api/reactlynx-testing-library/Function.findAllByTestId.mdx @@ -0,0 +1,37 @@ +{/* +* This file is generated by @lynx-js/tool-typedoc. +* Do not edit this file directly. +* @generated +*/} + +{/* Import all components as Lynx to allow dynamic lookup in TSDoc writings. */} +import * as Lynx from '@lynx'; + + +[reactlynx-testing-library](/api/reactlynx-testing-library/index.mdx) / findAllByTestId + +# Function: findAllByTestId() + +```ts +function findAllByTestId(...args: [HTMLElement, Matcher, MatcherOptions, waitForOptions]): ReturnType> +``` + +## Type Parameters + +| Type Parameter | Default type | +| ------ | ------ | +| `T` *extends* `HTMLElement` | `HTMLElement` | + +## Parameters + +| Parameter | Type | +| ------ | ------ | +| ...`args` | [`HTMLElement`, [`Matcher`](/api/reactlynx-testing-library/TypeAlias.Matcher.mdx), [`MatcherOptions`](/api/reactlynx-testing-library/Interface.MatcherOptions.mdx), [`waitForOptions`](/api/reactlynx-testing-library/Interface.waitForOptions.mdx)] | + +## Returns + +`ReturnType`\<[`FindAllByBoundAttribute`](/api/reactlynx-testing-library/TypeAlias.FindAllByBoundAttribute.mdx)\<`T`\>\> + +## Defined in + +index.d.ts:488 diff --git a/docs/en/api/reactlynx-testing-library/Function.findAllByText.mdx b/docs/en/api/reactlynx-testing-library/Function.findAllByText.mdx new file mode 100644 index 000000000..f8d04d90e --- /dev/null +++ b/docs/en/api/reactlynx-testing-library/Function.findAllByText.mdx @@ -0,0 +1,37 @@ +{/* +* This file is generated by @lynx-js/tool-typedoc. +* Do not edit this file directly. +* @generated +*/} + +{/* Import all components as Lynx to allow dynamic lookup in TSDoc writings. */} +import * as Lynx from '@lynx'; + + +[reactlynx-testing-library](/api/reactlynx-testing-library/index.mdx) / findAllByText + +# Function: findAllByText() + +```ts +function findAllByText(...args: [HTMLElement, Matcher, SelectorMatcherOptions, waitForOptions]): ReturnType> +``` + +## Type Parameters + +| Type Parameter | Default type | +| ------ | ------ | +| `T` *extends* `HTMLElement` | `HTMLElement` | + +## Parameters + +| Parameter | Type | +| ------ | ------ | +| ...`args` | [`HTMLElement`, [`Matcher`](/api/reactlynx-testing-library/TypeAlias.Matcher.mdx), [`SelectorMatcherOptions`](/api/reactlynx-testing-library/queryHelpers.Interface.SelectorMatcherOptions.mdx), [`waitForOptions`](/api/reactlynx-testing-library/Interface.waitForOptions.mdx)] | + +## Returns + +`ReturnType`\<[`FindAllByText`](/api/reactlynx-testing-library/TypeAlias.FindAllByText.mdx)\<`T`\>\> + +## Defined in + +index.d.ts:499 diff --git a/docs/en/api/reactlynx-testing-library/Function.findAllByTitle.mdx b/docs/en/api/reactlynx-testing-library/Function.findAllByTitle.mdx new file mode 100644 index 000000000..8b7e22041 --- /dev/null +++ b/docs/en/api/reactlynx-testing-library/Function.findAllByTitle.mdx @@ -0,0 +1,37 @@ +{/* +* This file is generated by @lynx-js/tool-typedoc. +* Do not edit this file directly. +* @generated +*/} + +{/* Import all components as Lynx to allow dynamic lookup in TSDoc writings. */} +import * as Lynx from '@lynx'; + + +[reactlynx-testing-library](/api/reactlynx-testing-library/index.mdx) / findAllByTitle + +# Function: findAllByTitle() + +```ts +function findAllByTitle(...args: [HTMLElement, Matcher, MatcherOptions, waitForOptions]): ReturnType> +``` + +## Type Parameters + +| Type Parameter | Default type | +| ------ | ------ | +| `T` *extends* `HTMLElement` | `HTMLElement` | + +## Parameters + +| Parameter | Type | +| ------ | ------ | +| ...`args` | [`HTMLElement`, [`Matcher`](/api/reactlynx-testing-library/TypeAlias.Matcher.mdx), [`MatcherOptions`](/api/reactlynx-testing-library/Interface.MatcherOptions.mdx), [`waitForOptions`](/api/reactlynx-testing-library/Interface.waitForOptions.mdx)] | + +## Returns + +`ReturnType`\<[`FindAllByBoundAttribute`](/api/reactlynx-testing-library/TypeAlias.FindAllByBoundAttribute.mdx)\<`T`\>\> + +## Defined in + +index.d.ts:503 diff --git a/docs/en/api/reactlynx-testing-library/Function.findByAltText.mdx b/docs/en/api/reactlynx-testing-library/Function.findByAltText.mdx new file mode 100644 index 000000000..c0266822c --- /dev/null +++ b/docs/en/api/reactlynx-testing-library/Function.findByAltText.mdx @@ -0,0 +1,37 @@ +{/* +* This file is generated by @lynx-js/tool-typedoc. +* Do not edit this file directly. +* @generated +*/} + +{/* Import all components as Lynx to allow dynamic lookup in TSDoc writings. */} +import * as Lynx from '@lynx'; + + +[reactlynx-testing-library](/api/reactlynx-testing-library/index.mdx) / findByAltText + +# Function: findByAltText() + +```ts +function findByAltText(...args: [HTMLElement, Matcher, MatcherOptions, waitForOptions]): ReturnType> +``` + +## Type Parameters + +| Type Parameter | Default type | +| ------ | ------ | +| `T` *extends* `HTMLElement` | `HTMLElement` | + +## Parameters + +| Parameter | Type | +| ------ | ------ | +| ...`args` | [`HTMLElement`, [`Matcher`](/api/reactlynx-testing-library/TypeAlias.Matcher.mdx), [`MatcherOptions`](/api/reactlynx-testing-library/Interface.MatcherOptions.mdx), [`waitForOptions`](/api/reactlynx-testing-library/Interface.waitForOptions.mdx)] | + +## Returns + +`ReturnType`\<[`FindByBoundAttribute`](/api/reactlynx-testing-library/TypeAlias.FindByBoundAttribute.mdx)\<`T`\>\> + +## Defined in + +index.d.ts:512 diff --git a/docs/en/api/reactlynx-testing-library/Function.findByDisplayValue.mdx b/docs/en/api/reactlynx-testing-library/Function.findByDisplayValue.mdx new file mode 100644 index 000000000..db3cf99df --- /dev/null +++ b/docs/en/api/reactlynx-testing-library/Function.findByDisplayValue.mdx @@ -0,0 +1,37 @@ +{/* +* This file is generated by @lynx-js/tool-typedoc. +* Do not edit this file directly. +* @generated +*/} + +{/* Import all components as Lynx to allow dynamic lookup in TSDoc writings. */} +import * as Lynx from '@lynx'; + + +[reactlynx-testing-library](/api/reactlynx-testing-library/index.mdx) / findByDisplayValue + +# Function: findByDisplayValue() + +```ts +function findByDisplayValue(...args: [HTMLElement, Matcher, MatcherOptions, waitForOptions]): ReturnType> +``` + +## Type Parameters + +| Type Parameter | Default type | +| ------ | ------ | +| `T` *extends* `HTMLElement` | `HTMLElement` | + +## Parameters + +| Parameter | Type | +| ------ | ------ | +| ...`args` | [`HTMLElement`, [`Matcher`](/api/reactlynx-testing-library/TypeAlias.Matcher.mdx), [`MatcherOptions`](/api/reactlynx-testing-library/Interface.MatcherOptions.mdx), [`waitForOptions`](/api/reactlynx-testing-library/Interface.waitForOptions.mdx)] | + +## Returns + +`ReturnType`\<[`FindByBoundAttribute`](/api/reactlynx-testing-library/TypeAlias.FindByBoundAttribute.mdx)\<`T`\>\> + +## Defined in + +index.d.ts:523 diff --git a/docs/en/api/reactlynx-testing-library/Function.findByLabelText.mdx b/docs/en/api/reactlynx-testing-library/Function.findByLabelText.mdx new file mode 100644 index 000000000..da21e4af9 --- /dev/null +++ b/docs/en/api/reactlynx-testing-library/Function.findByLabelText.mdx @@ -0,0 +1,37 @@ +{/* +* This file is generated by @lynx-js/tool-typedoc. +* Do not edit this file directly. +* @generated +*/} + +{/* Import all components as Lynx to allow dynamic lookup in TSDoc writings. */} +import * as Lynx from '@lynx'; + + +[reactlynx-testing-library](/api/reactlynx-testing-library/index.mdx) / findByLabelText + +# Function: findByLabelText() + +```ts +function findByLabelText(...args: [HTMLElement, Matcher, SelectorMatcherOptions, waitForOptions]): ReturnType> +``` + +## Type Parameters + +| Type Parameter | Default type | +| ------ | ------ | +| `T` *extends* `HTMLElement` | `HTMLElement` | + +## Parameters + +| Parameter | Type | +| ------ | ------ | +| ...`args` | [`HTMLElement`, [`Matcher`](/api/reactlynx-testing-library/TypeAlias.Matcher.mdx), [`SelectorMatcherOptions`](/api/reactlynx-testing-library/queryHelpers.Interface.SelectorMatcherOptions.mdx), [`waitForOptions`](/api/reactlynx-testing-library/Interface.waitForOptions.mdx)] | + +## Returns + +`ReturnType`\<[`FindByText`](/api/reactlynx-testing-library/TypeAlias.FindByText.mdx)\<`T`\>\> + +## Defined in + +index.d.ts:527 diff --git a/docs/en/api/reactlynx-testing-library/Function.findByPlaceholderText.mdx b/docs/en/api/reactlynx-testing-library/Function.findByPlaceholderText.mdx new file mode 100644 index 000000000..7917ec0b3 --- /dev/null +++ b/docs/en/api/reactlynx-testing-library/Function.findByPlaceholderText.mdx @@ -0,0 +1,37 @@ +{/* +* This file is generated by @lynx-js/tool-typedoc. +* Do not edit this file directly. +* @generated +*/} + +{/* Import all components as Lynx to allow dynamic lookup in TSDoc writings. */} +import * as Lynx from '@lynx'; + + +[reactlynx-testing-library](/api/reactlynx-testing-library/index.mdx) / findByPlaceholderText + +# Function: findByPlaceholderText() + +```ts +function findByPlaceholderText(...args: [HTMLElement, Matcher, MatcherOptions, waitForOptions]): ReturnType> +``` + +## Type Parameters + +| Type Parameter | Default type | +| ------ | ------ | +| `T` *extends* `HTMLElement` | `HTMLElement` | + +## Parameters + +| Parameter | Type | +| ------ | ------ | +| ...`args` | [`HTMLElement`, [`Matcher`](/api/reactlynx-testing-library/TypeAlias.Matcher.mdx), [`MatcherOptions`](/api/reactlynx-testing-library/Interface.MatcherOptions.mdx), [`waitForOptions`](/api/reactlynx-testing-library/Interface.waitForOptions.mdx)] | + +## Returns + +`ReturnType`\<[`FindByBoundAttribute`](/api/reactlynx-testing-library/TypeAlias.FindByBoundAttribute.mdx)\<`T`\>\> + +## Defined in + +index.d.ts:531 diff --git a/docs/en/api/reactlynx-testing-library/Function.findByRole.mdx b/docs/en/api/reactlynx-testing-library/Function.findByRole.mdx new file mode 100644 index 000000000..4d1c7a285 --- /dev/null +++ b/docs/en/api/reactlynx-testing-library/Function.findByRole.mdx @@ -0,0 +1,37 @@ +{/* +* This file is generated by @lynx-js/tool-typedoc. +* Do not edit this file directly. +* @generated +*/} + +{/* Import all components as Lynx to allow dynamic lookup in TSDoc writings. */} +import * as Lynx from '@lynx'; + + +[reactlynx-testing-library](/api/reactlynx-testing-library/index.mdx) / findByRole + +# Function: findByRole() + +```ts +function findByRole(...args: [HTMLElement, any, ByRoleOptions, waitForOptions]): ReturnType> +``` + +## Type Parameters + +| Type Parameter | Default type | +| ------ | ------ | +| `T` *extends* `HTMLElement` | `HTMLElement` | + +## Parameters + +| Parameter | Type | +| ------ | ------ | +| ...`args` | [`HTMLElement`, `any`, [`ByRoleOptions`](/api/reactlynx-testing-library/Interface.ByRoleOptions.mdx), [`waitForOptions`](/api/reactlynx-testing-library/Interface.waitForOptions.mdx)] | + +## Returns + +`ReturnType`\<[`FindByRole`](/api/reactlynx-testing-library/TypeAlias.FindByRole.mdx)\<`T`\>\> + +## Defined in + +index.d.ts:542 diff --git a/docs/en/api/reactlynx-testing-library/Function.findByTestId.mdx b/docs/en/api/reactlynx-testing-library/Function.findByTestId.mdx new file mode 100644 index 000000000..79af76e7c --- /dev/null +++ b/docs/en/api/reactlynx-testing-library/Function.findByTestId.mdx @@ -0,0 +1,37 @@ +{/* +* This file is generated by @lynx-js/tool-typedoc. +* Do not edit this file directly. +* @generated +*/} + +{/* Import all components as Lynx to allow dynamic lookup in TSDoc writings. */} +import * as Lynx from '@lynx'; + + +[reactlynx-testing-library](/api/reactlynx-testing-library/index.mdx) / findByTestId + +# Function: findByTestId() + +```ts +function findByTestId(...args: [HTMLElement, Matcher, MatcherOptions, waitForOptions]): ReturnType> +``` + +## Type Parameters + +| Type Parameter | Default type | +| ------ | ------ | +| `T` *extends* `HTMLElement` | `HTMLElement` | + +## Parameters + +| Parameter | Type | +| ------ | ------ | +| ...`args` | [`HTMLElement`, [`Matcher`](/api/reactlynx-testing-library/TypeAlias.Matcher.mdx), [`MatcherOptions`](/api/reactlynx-testing-library/Interface.MatcherOptions.mdx), [`waitForOptions`](/api/reactlynx-testing-library/Interface.waitForOptions.mdx)] | + +## Returns + +`ReturnType`\<[`FindByBoundAttribute`](/api/reactlynx-testing-library/TypeAlias.FindByBoundAttribute.mdx)\<`T`\>\> + +## Defined in + +index.d.ts:546 diff --git a/docs/en/api/reactlynx-testing-library/Function.findByText.mdx b/docs/en/api/reactlynx-testing-library/Function.findByText.mdx new file mode 100644 index 000000000..374f354f6 --- /dev/null +++ b/docs/en/api/reactlynx-testing-library/Function.findByText.mdx @@ -0,0 +1,37 @@ +{/* +* This file is generated by @lynx-js/tool-typedoc. +* Do not edit this file directly. +* @generated +*/} + +{/* Import all components as Lynx to allow dynamic lookup in TSDoc writings. */} +import * as Lynx from '@lynx'; + + +[reactlynx-testing-library](/api/reactlynx-testing-library/index.mdx) / findByText + +# Function: findByText() + +```ts +function findByText(...args: [HTMLElement, Matcher, SelectorMatcherOptions, waitForOptions]): ReturnType> +``` + +## Type Parameters + +| Type Parameter | Default type | +| ------ | ------ | +| `T` *extends* `HTMLElement` | `HTMLElement` | + +## Parameters + +| Parameter | Type | +| ------ | ------ | +| ...`args` | [`HTMLElement`, [`Matcher`](/api/reactlynx-testing-library/TypeAlias.Matcher.mdx), [`SelectorMatcherOptions`](/api/reactlynx-testing-library/queryHelpers.Interface.SelectorMatcherOptions.mdx), [`waitForOptions`](/api/reactlynx-testing-library/Interface.waitForOptions.mdx)] | + +## Returns + +`ReturnType`\<[`FindByText`](/api/reactlynx-testing-library/TypeAlias.FindByText.mdx)\<`T`\>\> + +## Defined in + +index.d.ts:557 diff --git a/docs/en/api/reactlynx-testing-library/Function.findByTitle.mdx b/docs/en/api/reactlynx-testing-library/Function.findByTitle.mdx new file mode 100644 index 000000000..779721549 --- /dev/null +++ b/docs/en/api/reactlynx-testing-library/Function.findByTitle.mdx @@ -0,0 +1,37 @@ +{/* +* This file is generated by @lynx-js/tool-typedoc. +* Do not edit this file directly. +* @generated +*/} + +{/* Import all components as Lynx to allow dynamic lookup in TSDoc writings. */} +import * as Lynx from '@lynx'; + + +[reactlynx-testing-library](/api/reactlynx-testing-library/index.mdx) / findByTitle + +# Function: findByTitle() + +```ts +function findByTitle(...args: [HTMLElement, Matcher, MatcherOptions, waitForOptions]): ReturnType> +``` + +## Type Parameters + +| Type Parameter | Default type | +| ------ | ------ | +| `T` *extends* `HTMLElement` | `HTMLElement` | + +## Parameters + +| Parameter | Type | +| ------ | ------ | +| ...`args` | [`HTMLElement`, [`Matcher`](/api/reactlynx-testing-library/TypeAlias.Matcher.mdx), [`MatcherOptions`](/api/reactlynx-testing-library/Interface.MatcherOptions.mdx), [`waitForOptions`](/api/reactlynx-testing-library/Interface.waitForOptions.mdx)] | + +## Returns + +`ReturnType`\<[`FindByBoundAttribute`](/api/reactlynx-testing-library/TypeAlias.FindByBoundAttribute.mdx)\<`T`\>\> + +## Defined in + +index.d.ts:561 diff --git a/docs/en/api/reactlynx-testing-library/Function.fireEvent.mdx b/docs/en/api/reactlynx-testing-library/Function.fireEvent.mdx new file mode 100644 index 000000000..5b7ddc8ba --- /dev/null +++ b/docs/en/api/reactlynx-testing-library/Function.fireEvent.mdx @@ -0,0 +1,32 @@ +{/* +* This file is generated by @lynx-js/tool-typedoc. +* Do not edit this file directly. +* @generated +*/} + +{/* Import all components as Lynx to allow dynamic lookup in TSDoc writings. */} +import * as Lynx from '@lynx'; + + +[reactlynx-testing-library](/api/reactlynx-testing-library/index.mdx) / fireEvent + +# Function: fireEvent() + +```ts +function fireEvent(element: any, event: Event): boolean +``` + +## Parameters + +| Parameter | Type | +| ------ | ------ | +| `element` | `any` | +| `event` | `Event` | + +## Returns + +`boolean` + +## Defined in + +index.d.ts:565 diff --git a/docs/en/api/reactlynx-testing-library/Function.getAllByAltText.mdx b/docs/en/api/reactlynx-testing-library/Function.getAllByAltText.mdx new file mode 100644 index 000000000..97285175f --- /dev/null +++ b/docs/en/api/reactlynx-testing-library/Function.getAllByAltText.mdx @@ -0,0 +1,37 @@ +{/* +* This file is generated by @lynx-js/tool-typedoc. +* Do not edit this file directly. +* @generated +*/} + +{/* Import all components as Lynx to allow dynamic lookup in TSDoc writings. */} +import * as Lynx from '@lynx'; + + +[reactlynx-testing-library](/api/reactlynx-testing-library/index.mdx) / getAllByAltText + +# Function: getAllByAltText() + +```ts +function getAllByAltText(...args: [HTMLElement, Matcher, MatcherOptions]): ReturnType> +``` + +## Type Parameters + +| Type Parameter | Default type | +| ------ | ------ | +| `T` *extends* `HTMLElement` | `HTMLElement` | + +## Parameters + +| Parameter | Type | +| ------ | ------ | +| ...`args` | [`HTMLElement`, [`Matcher`](/api/reactlynx-testing-library/TypeAlias.Matcher.mdx), [`MatcherOptions`](/api/reactlynx-testing-library/Interface.MatcherOptions.mdx)] | + +## Returns + +`ReturnType`\<[`AllByBoundAttribute`](/api/reactlynx-testing-library/TypeAlias.AllByBoundAttribute.mdx)\<`T`\>\> + +## Defined in + +index.d.ts:584 diff --git a/docs/en/api/reactlynx-testing-library/Function.getAllByDisplayValue.mdx b/docs/en/api/reactlynx-testing-library/Function.getAllByDisplayValue.mdx new file mode 100644 index 000000000..73b9f7c67 --- /dev/null +++ b/docs/en/api/reactlynx-testing-library/Function.getAllByDisplayValue.mdx @@ -0,0 +1,37 @@ +{/* +* This file is generated by @lynx-js/tool-typedoc. +* Do not edit this file directly. +* @generated +*/} + +{/* Import all components as Lynx to allow dynamic lookup in TSDoc writings. */} +import * as Lynx from '@lynx'; + + +[reactlynx-testing-library](/api/reactlynx-testing-library/index.mdx) / getAllByDisplayValue + +# Function: getAllByDisplayValue() + +```ts +function getAllByDisplayValue(...args: [HTMLElement, Matcher, MatcherOptions]): ReturnType> +``` + +## Type Parameters + +| Type Parameter | Default type | +| ------ | ------ | +| `T` *extends* `HTMLElement` | `HTMLElement` | + +## Parameters + +| Parameter | Type | +| ------ | ------ | +| ...`args` | [`HTMLElement`, [`Matcher`](/api/reactlynx-testing-library/TypeAlias.Matcher.mdx), [`MatcherOptions`](/api/reactlynx-testing-library/Interface.MatcherOptions.mdx)] | + +## Returns + +`ReturnType`\<[`AllByBoundAttribute`](/api/reactlynx-testing-library/TypeAlias.AllByBoundAttribute.mdx)\<`T`\>\> + +## Defined in + +index.d.ts:588 diff --git a/docs/en/api/reactlynx-testing-library/Function.getAllByLabelText.mdx b/docs/en/api/reactlynx-testing-library/Function.getAllByLabelText.mdx new file mode 100644 index 000000000..09ca976b0 --- /dev/null +++ b/docs/en/api/reactlynx-testing-library/Function.getAllByLabelText.mdx @@ -0,0 +1,37 @@ +{/* +* This file is generated by @lynx-js/tool-typedoc. +* Do not edit this file directly. +* @generated +*/} + +{/* Import all components as Lynx to allow dynamic lookup in TSDoc writings. */} +import * as Lynx from '@lynx'; + + +[reactlynx-testing-library](/api/reactlynx-testing-library/index.mdx) / getAllByLabelText + +# Function: getAllByLabelText() + +```ts +function getAllByLabelText(...args: [HTMLElement, Matcher, SelectorMatcherOptions]): ReturnType> +``` + +## Type Parameters + +| Type Parameter | Default type | +| ------ | ------ | +| `T` *extends* `HTMLElement` | `HTMLElement` | + +## Parameters + +| Parameter | Type | +| ------ | ------ | +| ...`args` | [`HTMLElement`, [`Matcher`](/api/reactlynx-testing-library/TypeAlias.Matcher.mdx), [`SelectorMatcherOptions`](/api/reactlynx-testing-library/queryHelpers.Interface.SelectorMatcherOptions.mdx)] | + +## Returns + +`ReturnType`\<[`AllByText`](/api/reactlynx-testing-library/TypeAlias.AllByText.mdx)\<`T`\>\> + +## Defined in + +index.d.ts:592 diff --git a/docs/en/api/reactlynx-testing-library/Function.getAllByPlaceholderText.mdx b/docs/en/api/reactlynx-testing-library/Function.getAllByPlaceholderText.mdx new file mode 100644 index 000000000..c379d1c6a --- /dev/null +++ b/docs/en/api/reactlynx-testing-library/Function.getAllByPlaceholderText.mdx @@ -0,0 +1,37 @@ +{/* +* This file is generated by @lynx-js/tool-typedoc. +* Do not edit this file directly. +* @generated +*/} + +{/* Import all components as Lynx to allow dynamic lookup in TSDoc writings. */} +import * as Lynx from '@lynx'; + + +[reactlynx-testing-library](/api/reactlynx-testing-library/index.mdx) / getAllByPlaceholderText + +# Function: getAllByPlaceholderText() + +```ts +function getAllByPlaceholderText(...args: [HTMLElement, Matcher, MatcherOptions]): ReturnType> +``` + +## Type Parameters + +| Type Parameter | Default type | +| ------ | ------ | +| `T` *extends* `HTMLElement` | `HTMLElement` | + +## Parameters + +| Parameter | Type | +| ------ | ------ | +| ...`args` | [`HTMLElement`, [`Matcher`](/api/reactlynx-testing-library/TypeAlias.Matcher.mdx), [`MatcherOptions`](/api/reactlynx-testing-library/Interface.MatcherOptions.mdx)] | + +## Returns + +`ReturnType`\<[`AllByBoundAttribute`](/api/reactlynx-testing-library/TypeAlias.AllByBoundAttribute.mdx)\<`T`\>\> + +## Defined in + +index.d.ts:596 diff --git a/docs/en/api/reactlynx-testing-library/Function.getAllByRole.mdx b/docs/en/api/reactlynx-testing-library/Function.getAllByRole.mdx new file mode 100644 index 000000000..080d9096d --- /dev/null +++ b/docs/en/api/reactlynx-testing-library/Function.getAllByRole.mdx @@ -0,0 +1,37 @@ +{/* +* This file is generated by @lynx-js/tool-typedoc. +* Do not edit this file directly. +* @generated +*/} + +{/* Import all components as Lynx to allow dynamic lookup in TSDoc writings. */} +import * as Lynx from '@lynx'; + + +[reactlynx-testing-library](/api/reactlynx-testing-library/index.mdx) / getAllByRole + +# Function: getAllByRole() + +```ts +function getAllByRole(...args: [HTMLElement, any, ByRoleOptions]): ReturnType> +``` + +## Type Parameters + +| Type Parameter | Default type | +| ------ | ------ | +| `T` *extends* `HTMLElement` | `HTMLElement` | + +## Parameters + +| Parameter | Type | +| ------ | ------ | +| ...`args` | [`HTMLElement`, `any`, [`ByRoleOptions`](/api/reactlynx-testing-library/Interface.ByRoleOptions.mdx)] | + +## Returns + +`ReturnType`\<[`AllByRole`](/api/reactlynx-testing-library/TypeAlias.AllByRole.mdx)\<`T`\>\> + +## Defined in + +index.d.ts:600 diff --git a/docs/en/api/reactlynx-testing-library/Function.getAllByTestId.mdx b/docs/en/api/reactlynx-testing-library/Function.getAllByTestId.mdx new file mode 100644 index 000000000..faf483bb3 --- /dev/null +++ b/docs/en/api/reactlynx-testing-library/Function.getAllByTestId.mdx @@ -0,0 +1,37 @@ +{/* +* This file is generated by @lynx-js/tool-typedoc. +* Do not edit this file directly. +* @generated +*/} + +{/* Import all components as Lynx to allow dynamic lookup in TSDoc writings. */} +import * as Lynx from '@lynx'; + + +[reactlynx-testing-library](/api/reactlynx-testing-library/index.mdx) / getAllByTestId + +# Function: getAllByTestId() + +```ts +function getAllByTestId(...args: [HTMLElement, Matcher, MatcherOptions]): ReturnType> +``` + +## Type Parameters + +| Type Parameter | Default type | +| ------ | ------ | +| `T` *extends* `HTMLElement` | `HTMLElement` | + +## Parameters + +| Parameter | Type | +| ------ | ------ | +| ...`args` | [`HTMLElement`, [`Matcher`](/api/reactlynx-testing-library/TypeAlias.Matcher.mdx), [`MatcherOptions`](/api/reactlynx-testing-library/Interface.MatcherOptions.mdx)] | + +## Returns + +`ReturnType`\<[`AllByBoundAttribute`](/api/reactlynx-testing-library/TypeAlias.AllByBoundAttribute.mdx)\<`T`\>\> + +## Defined in + +index.d.ts:604 diff --git a/docs/en/api/reactlynx-testing-library/Function.getAllByText.mdx b/docs/en/api/reactlynx-testing-library/Function.getAllByText.mdx new file mode 100644 index 000000000..a3631344b --- /dev/null +++ b/docs/en/api/reactlynx-testing-library/Function.getAllByText.mdx @@ -0,0 +1,37 @@ +{/* +* This file is generated by @lynx-js/tool-typedoc. +* Do not edit this file directly. +* @generated +*/} + +{/* Import all components as Lynx to allow dynamic lookup in TSDoc writings. */} +import * as Lynx from '@lynx'; + + +[reactlynx-testing-library](/api/reactlynx-testing-library/index.mdx) / getAllByText + +# Function: getAllByText() + +```ts +function getAllByText(...args: [HTMLElement, Matcher, SelectorMatcherOptions]): ReturnType> +``` + +## Type Parameters + +| Type Parameter | Default type | +| ------ | ------ | +| `T` *extends* `HTMLElement` | `HTMLElement` | + +## Parameters + +| Parameter | Type | +| ------ | ------ | +| ...`args` | [`HTMLElement`, [`Matcher`](/api/reactlynx-testing-library/TypeAlias.Matcher.mdx), [`SelectorMatcherOptions`](/api/reactlynx-testing-library/queryHelpers.Interface.SelectorMatcherOptions.mdx)] | + +## Returns + +`ReturnType`\<[`AllByText`](/api/reactlynx-testing-library/TypeAlias.AllByText.mdx)\<`T`\>\> + +## Defined in + +index.d.ts:608 diff --git a/docs/en/api/reactlynx-testing-library/Function.getAllByTitle.mdx b/docs/en/api/reactlynx-testing-library/Function.getAllByTitle.mdx new file mode 100644 index 000000000..632ac8b69 --- /dev/null +++ b/docs/en/api/reactlynx-testing-library/Function.getAllByTitle.mdx @@ -0,0 +1,37 @@ +{/* +* This file is generated by @lynx-js/tool-typedoc. +* Do not edit this file directly. +* @generated +*/} + +{/* Import all components as Lynx to allow dynamic lookup in TSDoc writings. */} +import * as Lynx from '@lynx'; + + +[reactlynx-testing-library](/api/reactlynx-testing-library/index.mdx) / getAllByTitle + +# Function: getAllByTitle() + +```ts +function getAllByTitle(...args: [HTMLElement, Matcher, MatcherOptions]): ReturnType> +``` + +## Type Parameters + +| Type Parameter | Default type | +| ------ | ------ | +| `T` *extends* `HTMLElement` | `HTMLElement` | + +## Parameters + +| Parameter | Type | +| ------ | ------ | +| ...`args` | [`HTMLElement`, [`Matcher`](/api/reactlynx-testing-library/TypeAlias.Matcher.mdx), [`MatcherOptions`](/api/reactlynx-testing-library/Interface.MatcherOptions.mdx)] | + +## Returns + +`ReturnType`\<[`AllByBoundAttribute`](/api/reactlynx-testing-library/TypeAlias.AllByBoundAttribute.mdx)\<`T`\>\> + +## Defined in + +index.d.ts:612 diff --git a/docs/en/api/reactlynx-testing-library/Function.getByAltText.mdx b/docs/en/api/reactlynx-testing-library/Function.getByAltText.mdx new file mode 100644 index 000000000..339f27dc9 --- /dev/null +++ b/docs/en/api/reactlynx-testing-library/Function.getByAltText.mdx @@ -0,0 +1,37 @@ +{/* +* This file is generated by @lynx-js/tool-typedoc. +* Do not edit this file directly. +* @generated +*/} + +{/* Import all components as Lynx to allow dynamic lookup in TSDoc writings. */} +import * as Lynx from '@lynx'; + + +[reactlynx-testing-library](/api/reactlynx-testing-library/index.mdx) / getByAltText + +# Function: getByAltText() + +```ts +function getByAltText(...args: [HTMLElement, Matcher, MatcherOptions]): ReturnType> +``` + +## Type Parameters + +| Type Parameter | Default type | +| ------ | ------ | +| `T` *extends* `HTMLElement` | `HTMLElement` | + +## Parameters + +| Parameter | Type | +| ------ | ------ | +| ...`args` | [`HTMLElement`, [`Matcher`](/api/reactlynx-testing-library/TypeAlias.Matcher.mdx), [`MatcherOptions`](/api/reactlynx-testing-library/Interface.MatcherOptions.mdx)] | + +## Returns + +`ReturnType`\<[`GetByBoundAttribute`](/api/reactlynx-testing-library/TypeAlias.GetByBoundAttribute.mdx)\<`T`\>\> + +## Defined in + +index.d.ts:618 diff --git a/docs/en/api/reactlynx-testing-library/Function.getByDisplayValue.mdx b/docs/en/api/reactlynx-testing-library/Function.getByDisplayValue.mdx new file mode 100644 index 000000000..003a2dac7 --- /dev/null +++ b/docs/en/api/reactlynx-testing-library/Function.getByDisplayValue.mdx @@ -0,0 +1,37 @@ +{/* +* This file is generated by @lynx-js/tool-typedoc. +* Do not edit this file directly. +* @generated +*/} + +{/* Import all components as Lynx to allow dynamic lookup in TSDoc writings. */} +import * as Lynx from '@lynx'; + + +[reactlynx-testing-library](/api/reactlynx-testing-library/index.mdx) / getByDisplayValue + +# Function: getByDisplayValue() + +```ts +function getByDisplayValue(...args: [HTMLElement, Matcher, MatcherOptions]): ReturnType> +``` + +## Type Parameters + +| Type Parameter | Default type | +| ------ | ------ | +| `T` *extends* `HTMLElement` | `HTMLElement` | + +## Parameters + +| Parameter | Type | +| ------ | ------ | +| ...`args` | [`HTMLElement`, [`Matcher`](/api/reactlynx-testing-library/TypeAlias.Matcher.mdx), [`MatcherOptions`](/api/reactlynx-testing-library/Interface.MatcherOptions.mdx)] | + +## Returns + +`ReturnType`\<[`GetByBoundAttribute`](/api/reactlynx-testing-library/TypeAlias.GetByBoundAttribute.mdx)\<`T`\>\> + +## Defined in + +index.d.ts:628 diff --git a/docs/en/api/reactlynx-testing-library/Function.getByLabelText.mdx b/docs/en/api/reactlynx-testing-library/Function.getByLabelText.mdx new file mode 100644 index 000000000..d1ab99fcf --- /dev/null +++ b/docs/en/api/reactlynx-testing-library/Function.getByLabelText.mdx @@ -0,0 +1,37 @@ +{/* +* This file is generated by @lynx-js/tool-typedoc. +* Do not edit this file directly. +* @generated +*/} + +{/* Import all components as Lynx to allow dynamic lookup in TSDoc writings. */} +import * as Lynx from '@lynx'; + + +[reactlynx-testing-library](/api/reactlynx-testing-library/index.mdx) / getByLabelText + +# Function: getByLabelText() + +```ts +function getByLabelText(...args: [HTMLElement, Matcher, SelectorMatcherOptions]): ReturnType> +``` + +## Type Parameters + +| Type Parameter | Default type | +| ------ | ------ | +| `T` *extends* `HTMLElement` | `HTMLElement` | + +## Parameters + +| Parameter | Type | +| ------ | ------ | +| ...`args` | [`HTMLElement`, [`Matcher`](/api/reactlynx-testing-library/TypeAlias.Matcher.mdx), [`SelectorMatcherOptions`](/api/reactlynx-testing-library/queryHelpers.Interface.SelectorMatcherOptions.mdx)] | + +## Returns + +`ReturnType`\<[`GetByText`](/api/reactlynx-testing-library/TypeAlias.GetByText.mdx)\<`T`\>\> + +## Defined in + +index.d.ts:632 diff --git a/docs/en/api/reactlynx-testing-library/Function.getByPlaceholderText.mdx b/docs/en/api/reactlynx-testing-library/Function.getByPlaceholderText.mdx new file mode 100644 index 000000000..686ebfafd --- /dev/null +++ b/docs/en/api/reactlynx-testing-library/Function.getByPlaceholderText.mdx @@ -0,0 +1,37 @@ +{/* +* This file is generated by @lynx-js/tool-typedoc. +* Do not edit this file directly. +* @generated +*/} + +{/* Import all components as Lynx to allow dynamic lookup in TSDoc writings. */} +import * as Lynx from '@lynx'; + + +[reactlynx-testing-library](/api/reactlynx-testing-library/index.mdx) / getByPlaceholderText + +# Function: getByPlaceholderText() + +```ts +function getByPlaceholderText(...args: [HTMLElement, Matcher, MatcherOptions]): ReturnType> +``` + +## Type Parameters + +| Type Parameter | Default type | +| ------ | ------ | +| `T` *extends* `HTMLElement` | `HTMLElement` | + +## Parameters + +| Parameter | Type | +| ------ | ------ | +| ...`args` | [`HTMLElement`, [`Matcher`](/api/reactlynx-testing-library/TypeAlias.Matcher.mdx), [`MatcherOptions`](/api/reactlynx-testing-library/Interface.MatcherOptions.mdx)] | + +## Returns + +`ReturnType`\<[`GetByBoundAttribute`](/api/reactlynx-testing-library/TypeAlias.GetByBoundAttribute.mdx)\<`T`\>\> + +## Defined in + +index.d.ts:636 diff --git a/docs/en/api/reactlynx-testing-library/Function.getByRole.mdx b/docs/en/api/reactlynx-testing-library/Function.getByRole.mdx new file mode 100644 index 000000000..3f1a14031 --- /dev/null +++ b/docs/en/api/reactlynx-testing-library/Function.getByRole.mdx @@ -0,0 +1,37 @@ +{/* +* This file is generated by @lynx-js/tool-typedoc. +* Do not edit this file directly. +* @generated +*/} + +{/* Import all components as Lynx to allow dynamic lookup in TSDoc writings. */} +import * as Lynx from '@lynx'; + + +[reactlynx-testing-library](/api/reactlynx-testing-library/index.mdx) / getByRole + +# Function: getByRole() + +```ts +function getByRole(...args: [HTMLElement, any, ByRoleOptions]): ReturnType> +``` + +## Type Parameters + +| Type Parameter | Default type | +| ------ | ------ | +| `T` *extends* `HTMLElement` | `HTMLElement` | + +## Parameters + +| Parameter | Type | +| ------ | ------ | +| ...`args` | [`HTMLElement`, `any`, [`ByRoleOptions`](/api/reactlynx-testing-library/Interface.ByRoleOptions.mdx)] | + +## Returns + +`ReturnType`\<[`GetByRole`](/api/reactlynx-testing-library/TypeAlias.GetByRole.mdx)\<`T`\>\> + +## Defined in + +index.d.ts:646 diff --git a/docs/en/api/reactlynx-testing-library/Function.getByTestId.mdx b/docs/en/api/reactlynx-testing-library/Function.getByTestId.mdx new file mode 100644 index 000000000..bf50030d9 --- /dev/null +++ b/docs/en/api/reactlynx-testing-library/Function.getByTestId.mdx @@ -0,0 +1,37 @@ +{/* +* This file is generated by @lynx-js/tool-typedoc. +* Do not edit this file directly. +* @generated +*/} + +{/* Import all components as Lynx to allow dynamic lookup in TSDoc writings. */} +import * as Lynx from '@lynx'; + + +[reactlynx-testing-library](/api/reactlynx-testing-library/index.mdx) / getByTestId + +# Function: getByTestId() + +```ts +function getByTestId(...args: [HTMLElement, Matcher, MatcherOptions]): ReturnType> +``` + +## Type Parameters + +| Type Parameter | Default type | +| ------ | ------ | +| `T` *extends* `HTMLElement` | `HTMLElement` | + +## Parameters + +| Parameter | Type | +| ------ | ------ | +| ...`args` | [`HTMLElement`, [`Matcher`](/api/reactlynx-testing-library/TypeAlias.Matcher.mdx), [`MatcherOptions`](/api/reactlynx-testing-library/Interface.MatcherOptions.mdx)] | + +## Returns + +`ReturnType`\<[`GetByBoundAttribute`](/api/reactlynx-testing-library/TypeAlias.GetByBoundAttribute.mdx)\<`T`\>\> + +## Defined in + +index.d.ts:650 diff --git a/docs/en/api/reactlynx-testing-library/Function.getByText.mdx b/docs/en/api/reactlynx-testing-library/Function.getByText.mdx new file mode 100644 index 000000000..c9add838f --- /dev/null +++ b/docs/en/api/reactlynx-testing-library/Function.getByText.mdx @@ -0,0 +1,37 @@ +{/* +* This file is generated by @lynx-js/tool-typedoc. +* Do not edit this file directly. +* @generated +*/} + +{/* Import all components as Lynx to allow dynamic lookup in TSDoc writings. */} +import * as Lynx from '@lynx'; + + +[reactlynx-testing-library](/api/reactlynx-testing-library/index.mdx) / getByText + +# Function: getByText() + +```ts +function getByText(...args: [HTMLElement, Matcher, SelectorMatcherOptions]): ReturnType> +``` + +## Type Parameters + +| Type Parameter | Default type | +| ------ | ------ | +| `T` *extends* `HTMLElement` | `HTMLElement` | + +## Parameters + +| Parameter | Type | +| ------ | ------ | +| ...`args` | [`HTMLElement`, [`Matcher`](/api/reactlynx-testing-library/TypeAlias.Matcher.mdx), [`SelectorMatcherOptions`](/api/reactlynx-testing-library/queryHelpers.Interface.SelectorMatcherOptions.mdx)] | + +## Returns + +`ReturnType`\<[`GetByText`](/api/reactlynx-testing-library/TypeAlias.GetByText.mdx)\<`T`\>\> + +## Defined in + +index.d.ts:660 diff --git a/docs/en/api/reactlynx-testing-library/Function.getByTitle.mdx b/docs/en/api/reactlynx-testing-library/Function.getByTitle.mdx new file mode 100644 index 000000000..df0c0b8c1 --- /dev/null +++ b/docs/en/api/reactlynx-testing-library/Function.getByTitle.mdx @@ -0,0 +1,37 @@ +{/* +* This file is generated by @lynx-js/tool-typedoc. +* Do not edit this file directly. +* @generated +*/} + +{/* Import all components as Lynx to allow dynamic lookup in TSDoc writings. */} +import * as Lynx from '@lynx'; + + +[reactlynx-testing-library](/api/reactlynx-testing-library/index.mdx) / getByTitle + +# Function: getByTitle() + +```ts +function getByTitle(...args: [HTMLElement, Matcher, MatcherOptions]): ReturnType> +``` + +## Type Parameters + +| Type Parameter | Default type | +| ------ | ------ | +| `T` *extends* `HTMLElement` | `HTMLElement` | + +## Parameters + +| Parameter | Type | +| ------ | ------ | +| ...`args` | [`HTMLElement`, [`Matcher`](/api/reactlynx-testing-library/TypeAlias.Matcher.mdx), [`MatcherOptions`](/api/reactlynx-testing-library/Interface.MatcherOptions.mdx)] | + +## Returns + +`ReturnType`\<[`GetByBoundAttribute`](/api/reactlynx-testing-library/TypeAlias.GetByBoundAttribute.mdx)\<`T`\>\> + +## Defined in + +index.d.ts:664 diff --git a/docs/en/api/reactlynx-testing-library/Function.getConfig.mdx b/docs/en/api/reactlynx-testing-library/Function.getConfig.mdx new file mode 100644 index 000000000..4e68ac313 --- /dev/null +++ b/docs/en/api/reactlynx-testing-library/Function.getConfig.mdx @@ -0,0 +1,25 @@ +{/* +* This file is generated by @lynx-js/tool-typedoc. +* Do not edit this file directly. +* @generated +*/} + +{/* Import all components as Lynx to allow dynamic lookup in TSDoc writings. */} +import * as Lynx from '@lynx'; + + +[reactlynx-testing-library](/api/reactlynx-testing-library/index.mdx) / getConfig + +# Function: getConfig() + +```ts +function getConfig(): Config +``` + +## Returns + +[`Config`](/api/reactlynx-testing-library/Interface.Config.mdx) + +## Defined in + +index.d.ts:668 diff --git a/docs/en/api/reactlynx-testing-library/Function.getDefaultNormalizer.mdx b/docs/en/api/reactlynx-testing-library/Function.getDefaultNormalizer.mdx new file mode 100644 index 000000000..07c8f2a85 --- /dev/null +++ b/docs/en/api/reactlynx-testing-library/Function.getDefaultNormalizer.mdx @@ -0,0 +1,31 @@ +{/* +* This file is generated by @lynx-js/tool-typedoc. +* Do not edit this file directly. +* @generated +*/} + +{/* Import all components as Lynx to allow dynamic lookup in TSDoc writings. */} +import * as Lynx from '@lynx'; + + +[reactlynx-testing-library](/api/reactlynx-testing-library/index.mdx) / getDefaultNormalizer + +# Function: getDefaultNormalizer() + +```ts +function getDefaultNormalizer(options?: DefaultNormalizerOptions): NormalizerFn +``` + +## Parameters + +| Parameter | Type | +| ------ | ------ | +| `options`? | [`DefaultNormalizerOptions`](/api/reactlynx-testing-library/Interface.DefaultNormalizerOptions.mdx) | + +## Returns + +[`NormalizerFn`](/api/reactlynx-testing-library/TypeAlias.NormalizerFn.mdx) + +## Defined in + +index.d.ts:670 diff --git a/docs/en/api/reactlynx-testing-library/Function.getElementError.mdx b/docs/en/api/reactlynx-testing-library/Function.getElementError.mdx new file mode 100644 index 000000000..4203b24d9 --- /dev/null +++ b/docs/en/api/reactlynx-testing-library/Function.getElementError.mdx @@ -0,0 +1,32 @@ +{/* +* This file is generated by @lynx-js/tool-typedoc. +* Do not edit this file directly. +* @generated +*/} + +{/* Import all components as Lynx to allow dynamic lookup in TSDoc writings. */} +import * as Lynx from '@lynx'; + + +[reactlynx-testing-library](/api/reactlynx-testing-library/index.mdx) / getElementError + +# Function: getElementError() + +```ts +function getElementError(message: null | string, container: HTMLElement): Error +``` + +## Parameters + +| Parameter | Type | +| ------ | ------ | +| `message` | `null` \| `string` | +| `container` | `HTMLElement` | + +## Returns + +`Error` + +## Defined in + +index.d.ts:674 diff --git a/docs/en/api/reactlynx-testing-library/Function.getNodeText.mdx b/docs/en/api/reactlynx-testing-library/Function.getNodeText.mdx new file mode 100644 index 000000000..61f3b4622 --- /dev/null +++ b/docs/en/api/reactlynx-testing-library/Function.getNodeText.mdx @@ -0,0 +1,31 @@ +{/* +* This file is generated by @lynx-js/tool-typedoc. +* Do not edit this file directly. +* @generated +*/} + +{/* Import all components as Lynx to allow dynamic lookup in TSDoc writings. */} +import * as Lynx from '@lynx'; + + +[reactlynx-testing-library](/api/reactlynx-testing-library/index.mdx) / getNodeText + +# Function: getNodeText() + +```ts +function getNodeText(node: HTMLElement): string +``` + +## Parameters + +| Parameter | Type | +| ------ | ------ | +| `node` | `HTMLElement` | + +## Returns + +`string` + +## Defined in + +index.d.ts:684 diff --git a/docs/en/api/reactlynx-testing-library/Function.getQueriesForElement.mdx b/docs/en/api/reactlynx-testing-library/Function.getQueriesForElement.mdx new file mode 100644 index 000000000..78dfccf0d --- /dev/null +++ b/docs/en/api/reactlynx-testing-library/Function.getQueriesForElement.mdx @@ -0,0 +1,39 @@ +{/* +* This file is generated by @lynx-js/tool-typedoc. +* Do not edit this file directly. +* @generated +*/} + +{/* Import all components as Lynx to allow dynamic lookup in TSDoc writings. */} +import * as Lynx from '@lynx'; + + +[reactlynx-testing-library](/api/reactlynx-testing-library/index.mdx) / getQueriesForElement + +# Function: getQueriesForElement() + +```ts +function getQueriesForElement(element: HTMLElement, queriesToBind?: T): BoundFunctions +``` + +## Type Parameters + +| Type Parameter | Default type | +| ------ | ------ | +| `QueriesToBind` *extends* [`Queries`](/api/reactlynx-testing-library/Interface.Queries.mdx) | *typeof* [`queries`](/api/reactlynx-testing-library/Namespace.queries.mdx) | +| `T` *extends* [`Queries`](/api/reactlynx-testing-library/Interface.Queries.mdx) | `QueriesToBind` | + +## Parameters + +| Parameter | Type | +| ------ | ------ | +| `element` | `HTMLElement` | +| `queriesToBind`? | `T` | + +## Returns + +[`BoundFunctions`](/api/reactlynx-testing-library/TypeAlias.BoundFunctions.mdx)\<`T`\> + +## Defined in + +index.d.ts:686 diff --git a/docs/en/api/reactlynx-testing-library/Function.getRoles.mdx b/docs/en/api/reactlynx-testing-library/Function.getRoles.mdx new file mode 100644 index 000000000..163ebfaed --- /dev/null +++ b/docs/en/api/reactlynx-testing-library/Function.getRoles.mdx @@ -0,0 +1,31 @@ +{/* +* This file is generated by @lynx-js/tool-typedoc. +* Do not edit this file directly. +* @generated +*/} + +{/* Import all components as Lynx to allow dynamic lookup in TSDoc writings. */} +import * as Lynx from '@lynx'; + + +[reactlynx-testing-library](/api/reactlynx-testing-library/index.mdx) / getRoles + +# Function: getRoles() + +```ts +function getRoles(container: HTMLElement): object +``` + +## Parameters + +| Parameter | Type | +| ------ | ------ | +| `container` | `HTMLElement` | + +## Returns + +`object` + +## Defined in + +index.d.ts:692 diff --git a/docs/en/api/reactlynx-testing-library/Function.getSuggestedQuery.mdx b/docs/en/api/reactlynx-testing-library/Function.getSuggestedQuery.mdx new file mode 100644 index 000000000..428d000af --- /dev/null +++ b/docs/en/api/reactlynx-testing-library/Function.getSuggestedQuery.mdx @@ -0,0 +1,36 @@ +{/* +* This file is generated by @lynx-js/tool-typedoc. +* Do not edit this file directly. +* @generated +*/} + +{/* Import all components as Lynx to allow dynamic lookup in TSDoc writings. */} +import * as Lynx from '@lynx'; + + +[reactlynx-testing-library](/api/reactlynx-testing-library/index.mdx) / getSuggestedQuery + +# Function: getSuggestedQuery() + +```ts +function getSuggestedQuery( + element: HTMLElement, + variant?: Variant, + method?: Method): Suggestion | undefined +``` + +## Parameters + +| Parameter | Type | +| ------ | ------ | +| `element` | `HTMLElement` | +| `variant`? | [`Variant`](/api/reactlynx-testing-library/TypeAlias.Variant.mdx) | +| `method`? | [`Method`](/api/reactlynx-testing-library/TypeAlias.Method.mdx) | + +## Returns + +[`Suggestion`](/api/reactlynx-testing-library/Interface.Suggestion.mdx) \| `undefined` + +## Defined in + +index.d.ts:696 diff --git a/docs/en/api/reactlynx-testing-library/Function.isInaccessible.mdx b/docs/en/api/reactlynx-testing-library/Function.isInaccessible.mdx new file mode 100644 index 000000000..4140e8fc1 --- /dev/null +++ b/docs/en/api/reactlynx-testing-library/Function.isInaccessible.mdx @@ -0,0 +1,33 @@ +{/* +* This file is generated by @lynx-js/tool-typedoc. +* Do not edit this file directly. +* @generated +*/} + +{/* Import all components as Lynx to allow dynamic lookup in TSDoc writings. */} +import * as Lynx from '@lynx'; + + +[reactlynx-testing-library](/api/reactlynx-testing-library/index.mdx) / isInaccessible + +# Function: isInaccessible() + +```ts +function isInaccessible(element: Element): boolean +``` + +https://testing-library.com/docs/dom-testing-library/api-helpers#isinaccessible + +## Parameters + +| Parameter | Type | +| ------ | ------ | +| `element` | `Element` | + +## Returns + +`boolean` + +## Defined in + +index.d.ts:773 diff --git a/docs/en/api/reactlynx-testing-library/Function.logDOM.mdx b/docs/en/api/reactlynx-testing-library/Function.logDOM.mdx new file mode 100644 index 000000000..2938c900c --- /dev/null +++ b/docs/en/api/reactlynx-testing-library/Function.logDOM.mdx @@ -0,0 +1,36 @@ +{/* +* This file is generated by @lynx-js/tool-typedoc. +* Do not edit this file directly. +* @generated +*/} + +{/* Import all components as Lynx to allow dynamic lookup in TSDoc writings. */} +import * as Lynx from '@lynx'; + + +[reactlynx-testing-library](/api/reactlynx-testing-library/index.mdx) / logDOM + +# Function: logDOM() + +```ts +function logDOM( + dom?: any, + maxLength?: number, + options?: PrettyDOMOptions): void +``` + +## Parameters + +| Parameter | Type | +| ------ | ------ | +| `dom`? | `any` | +| `maxLength`? | `number` | +| `options`? | [`PrettyDOMOptions`](/api/reactlynx-testing-library/Interface.PrettyDOMOptions.mdx) | + +## Returns + +`void` + +## Defined in + +index.d.ts:775 diff --git a/docs/en/api/reactlynx-testing-library/Function.logRoles.mdx b/docs/en/api/reactlynx-testing-library/Function.logRoles.mdx new file mode 100644 index 000000000..388f312bd --- /dev/null +++ b/docs/en/api/reactlynx-testing-library/Function.logRoles.mdx @@ -0,0 +1,32 @@ +{/* +* This file is generated by @lynx-js/tool-typedoc. +* Do not edit this file directly. +* @generated +*/} + +{/* Import all components as Lynx to allow dynamic lookup in TSDoc writings. */} +import * as Lynx from '@lynx'; + + +[reactlynx-testing-library](/api/reactlynx-testing-library/index.mdx) / logRoles + +# Function: logRoles() + +```ts +function logRoles(container: HTMLElement, options?: LogRolesOptions): string +``` + +## Parameters + +| Parameter | Type | +| ------ | ------ | +| `container` | `HTMLElement` | +| `options`? | [`LogRolesOptions`](/api/reactlynx-testing-library/Interface.LogRolesOptions.mdx) | + +## Returns + +`string` + +## Defined in + +index.d.ts:781 diff --git a/docs/en/api/reactlynx-testing-library/Function.prettyDOM.mdx b/docs/en/api/reactlynx-testing-library/Function.prettyDOM.mdx new file mode 100644 index 000000000..50926c1dc --- /dev/null +++ b/docs/en/api/reactlynx-testing-library/Function.prettyDOM.mdx @@ -0,0 +1,36 @@ +{/* +* This file is generated by @lynx-js/tool-typedoc. +* Do not edit this file directly. +* @generated +*/} + +{/* Import all components as Lynx to allow dynamic lookup in TSDoc writings. */} +import * as Lynx from '@lynx'; + + +[reactlynx-testing-library](/api/reactlynx-testing-library/index.mdx) / prettyDOM + +# Function: prettyDOM() + +```ts +function prettyDOM( + dom?: any, + maxLength?: number, + options?: PrettyDOMOptions): string | false +``` + +## Parameters + +| Parameter | Type | +| ------ | ------ | +| `dom`? | `any` | +| `maxLength`? | `number` | +| `options`? | [`PrettyDOMOptions`](/api/reactlynx-testing-library/Interface.PrettyDOMOptions.mdx) | + +## Returns + +`string` \| `false` + +## Defined in + +index.d.ts:967 diff --git a/docs/en/api/reactlynx-testing-library/Function.queryAllByAltText.mdx b/docs/en/api/reactlynx-testing-library/Function.queryAllByAltText.mdx new file mode 100644 index 000000000..1745bbaf6 --- /dev/null +++ b/docs/en/api/reactlynx-testing-library/Function.queryAllByAltText.mdx @@ -0,0 +1,37 @@ +{/* +* This file is generated by @lynx-js/tool-typedoc. +* Do not edit this file directly. +* @generated +*/} + +{/* Import all components as Lynx to allow dynamic lookup in TSDoc writings. */} +import * as Lynx from '@lynx'; + + +[reactlynx-testing-library](/api/reactlynx-testing-library/index.mdx) / queryAllByAltText + +# Function: queryAllByAltText() + +```ts +function queryAllByAltText(...args: [HTMLElement, Matcher, MatcherOptions]): ReturnType> +``` + +## Type Parameters + +| Type Parameter | Default type | +| ------ | ------ | +| `T` *extends* `HTMLElement` | `HTMLElement` | + +## Parameters + +| Parameter | Type | +| ------ | ------ | +| ...`args` | [`HTMLElement`, [`Matcher`](/api/reactlynx-testing-library/TypeAlias.Matcher.mdx), [`MatcherOptions`](/api/reactlynx-testing-library/Interface.MatcherOptions.mdx)] | + +## Returns + +`ReturnType`\<[`AllByBoundAttribute`](/api/reactlynx-testing-library/TypeAlias.AllByBoundAttribute.mdx)\<`T`\>\> + +## Defined in + +index.d.ts:1068 diff --git a/docs/en/api/reactlynx-testing-library/Function.queryAllByAttribute.mdx b/docs/en/api/reactlynx-testing-library/Function.queryAllByAttribute.mdx new file mode 100644 index 000000000..c640c5ef8 --- /dev/null +++ b/docs/en/api/reactlynx-testing-library/Function.queryAllByAttribute.mdx @@ -0,0 +1,38 @@ +{/* +* This file is generated by @lynx-js/tool-typedoc. +* Do not edit this file directly. +* @generated +*/} + +{/* Import all components as Lynx to allow dynamic lookup in TSDoc writings. */} +import * as Lynx from '@lynx'; + + +[reactlynx-testing-library](/api/reactlynx-testing-library/index.mdx) / queryAllByAttribute + +# Function: queryAllByAttribute() + +```ts +function queryAllByAttribute( + attribute: string, + container: HTMLElement, + id: Matcher, + options?: MatcherOptions): HTMLElement[] +``` + +## Parameters + +| Parameter | Type | +| ------ | ------ | +| `attribute` | `string` | +| `container` | `HTMLElement` | +| `id` | [`Matcher`](/api/reactlynx-testing-library/TypeAlias.Matcher.mdx) | +| `options`? | [`MatcherOptions`](/api/reactlynx-testing-library/Interface.MatcherOptions.mdx) | + +## Returns + +`HTMLElement`[] + +## Defined in + +index.d.ts:1072 diff --git a/docs/en/api/reactlynx-testing-library/Function.queryAllByDisplayValue.mdx b/docs/en/api/reactlynx-testing-library/Function.queryAllByDisplayValue.mdx new file mode 100644 index 000000000..02d4bf29a --- /dev/null +++ b/docs/en/api/reactlynx-testing-library/Function.queryAllByDisplayValue.mdx @@ -0,0 +1,37 @@ +{/* +* This file is generated by @lynx-js/tool-typedoc. +* Do not edit this file directly. +* @generated +*/} + +{/* Import all components as Lynx to allow dynamic lookup in TSDoc writings. */} +import * as Lynx from '@lynx'; + + +[reactlynx-testing-library](/api/reactlynx-testing-library/index.mdx) / queryAllByDisplayValue + +# Function: queryAllByDisplayValue() + +```ts +function queryAllByDisplayValue(...args: [HTMLElement, Matcher, MatcherOptions]): ReturnType> +``` + +## Type Parameters + +| Type Parameter | Default type | +| ------ | ------ | +| `T` *extends* `HTMLElement` | `HTMLElement` | + +## Parameters + +| Parameter | Type | +| ------ | ------ | +| ...`args` | [`HTMLElement`, [`Matcher`](/api/reactlynx-testing-library/TypeAlias.Matcher.mdx), [`MatcherOptions`](/api/reactlynx-testing-library/Interface.MatcherOptions.mdx)] | + +## Returns + +`ReturnType`\<[`AllByBoundAttribute`](/api/reactlynx-testing-library/TypeAlias.AllByBoundAttribute.mdx)\<`T`\>\> + +## Defined in + +index.d.ts:1074 diff --git a/docs/en/api/reactlynx-testing-library/Function.queryAllByLabelText.mdx b/docs/en/api/reactlynx-testing-library/Function.queryAllByLabelText.mdx new file mode 100644 index 000000000..c5ac14b67 --- /dev/null +++ b/docs/en/api/reactlynx-testing-library/Function.queryAllByLabelText.mdx @@ -0,0 +1,37 @@ +{/* +* This file is generated by @lynx-js/tool-typedoc. +* Do not edit this file directly. +* @generated +*/} + +{/* Import all components as Lynx to allow dynamic lookup in TSDoc writings. */} +import * as Lynx from '@lynx'; + + +[reactlynx-testing-library](/api/reactlynx-testing-library/index.mdx) / queryAllByLabelText + +# Function: queryAllByLabelText() + +```ts +function queryAllByLabelText(...args: [HTMLElement, Matcher, SelectorMatcherOptions]): ReturnType> +``` + +## Type Parameters + +| Type Parameter | Default type | +| ------ | ------ | +| `T` *extends* `HTMLElement` | `HTMLElement` | + +## Parameters + +| Parameter | Type | +| ------ | ------ | +| ...`args` | [`HTMLElement`, [`Matcher`](/api/reactlynx-testing-library/TypeAlias.Matcher.mdx), [`SelectorMatcherOptions`](/api/reactlynx-testing-library/queryHelpers.Interface.SelectorMatcherOptions.mdx)] | + +## Returns + +`ReturnType`\<[`AllByText`](/api/reactlynx-testing-library/TypeAlias.AllByText.mdx)\<`T`\>\> + +## Defined in + +index.d.ts:1078 diff --git a/docs/en/api/reactlynx-testing-library/Function.queryAllByPlaceholderText.mdx b/docs/en/api/reactlynx-testing-library/Function.queryAllByPlaceholderText.mdx new file mode 100644 index 000000000..7f473f5a6 --- /dev/null +++ b/docs/en/api/reactlynx-testing-library/Function.queryAllByPlaceholderText.mdx @@ -0,0 +1,37 @@ +{/* +* This file is generated by @lynx-js/tool-typedoc. +* Do not edit this file directly. +* @generated +*/} + +{/* Import all components as Lynx to allow dynamic lookup in TSDoc writings. */} +import * as Lynx from '@lynx'; + + +[reactlynx-testing-library](/api/reactlynx-testing-library/index.mdx) / queryAllByPlaceholderText + +# Function: queryAllByPlaceholderText() + +```ts +function queryAllByPlaceholderText(...args: [HTMLElement, Matcher, MatcherOptions]): ReturnType> +``` + +## Type Parameters + +| Type Parameter | Default type | +| ------ | ------ | +| `T` *extends* `HTMLElement` | `HTMLElement` | + +## Parameters + +| Parameter | Type | +| ------ | ------ | +| ...`args` | [`HTMLElement`, [`Matcher`](/api/reactlynx-testing-library/TypeAlias.Matcher.mdx), [`MatcherOptions`](/api/reactlynx-testing-library/Interface.MatcherOptions.mdx)] | + +## Returns + +`ReturnType`\<[`AllByBoundAttribute`](/api/reactlynx-testing-library/TypeAlias.AllByBoundAttribute.mdx)\<`T`\>\> + +## Defined in + +index.d.ts:1082 diff --git a/docs/en/api/reactlynx-testing-library/Function.queryAllByRole.mdx b/docs/en/api/reactlynx-testing-library/Function.queryAllByRole.mdx new file mode 100644 index 000000000..d9de83c93 --- /dev/null +++ b/docs/en/api/reactlynx-testing-library/Function.queryAllByRole.mdx @@ -0,0 +1,37 @@ +{/* +* This file is generated by @lynx-js/tool-typedoc. +* Do not edit this file directly. +* @generated +*/} + +{/* Import all components as Lynx to allow dynamic lookup in TSDoc writings. */} +import * as Lynx from '@lynx'; + + +[reactlynx-testing-library](/api/reactlynx-testing-library/index.mdx) / queryAllByRole + +# Function: queryAllByRole() + +```ts +function queryAllByRole(...args: [HTMLElement, any, ByRoleOptions]): ReturnType> +``` + +## Type Parameters + +| Type Parameter | Default type | +| ------ | ------ | +| `T` *extends* `HTMLElement` | `HTMLElement` | + +## Parameters + +| Parameter | Type | +| ------ | ------ | +| ...`args` | [`HTMLElement`, `any`, [`ByRoleOptions`](/api/reactlynx-testing-library/Interface.ByRoleOptions.mdx)] | + +## Returns + +`ReturnType`\<[`AllByRole`](/api/reactlynx-testing-library/TypeAlias.AllByRole.mdx)\<`T`\>\> + +## Defined in + +index.d.ts:1086 diff --git a/docs/en/api/reactlynx-testing-library/Function.queryAllByTestId.mdx b/docs/en/api/reactlynx-testing-library/Function.queryAllByTestId.mdx new file mode 100644 index 000000000..00d205df6 --- /dev/null +++ b/docs/en/api/reactlynx-testing-library/Function.queryAllByTestId.mdx @@ -0,0 +1,37 @@ +{/* +* This file is generated by @lynx-js/tool-typedoc. +* Do not edit this file directly. +* @generated +*/} + +{/* Import all components as Lynx to allow dynamic lookup in TSDoc writings. */} +import * as Lynx from '@lynx'; + + +[reactlynx-testing-library](/api/reactlynx-testing-library/index.mdx) / queryAllByTestId + +# Function: queryAllByTestId() + +```ts +function queryAllByTestId(...args: [HTMLElement, Matcher, MatcherOptions]): ReturnType> +``` + +## Type Parameters + +| Type Parameter | Default type | +| ------ | ------ | +| `T` *extends* `HTMLElement` | `HTMLElement` | + +## Parameters + +| Parameter | Type | +| ------ | ------ | +| ...`args` | [`HTMLElement`, [`Matcher`](/api/reactlynx-testing-library/TypeAlias.Matcher.mdx), [`MatcherOptions`](/api/reactlynx-testing-library/Interface.MatcherOptions.mdx)] | + +## Returns + +`ReturnType`\<[`AllByBoundAttribute`](/api/reactlynx-testing-library/TypeAlias.AllByBoundAttribute.mdx)\<`T`\>\> + +## Defined in + +index.d.ts:1090 diff --git a/docs/en/api/reactlynx-testing-library/Function.queryAllByText.mdx b/docs/en/api/reactlynx-testing-library/Function.queryAllByText.mdx new file mode 100644 index 000000000..89ee67b3b --- /dev/null +++ b/docs/en/api/reactlynx-testing-library/Function.queryAllByText.mdx @@ -0,0 +1,37 @@ +{/* +* This file is generated by @lynx-js/tool-typedoc. +* Do not edit this file directly. +* @generated +*/} + +{/* Import all components as Lynx to allow dynamic lookup in TSDoc writings. */} +import * as Lynx from '@lynx'; + + +[reactlynx-testing-library](/api/reactlynx-testing-library/index.mdx) / queryAllByText + +# Function: queryAllByText() + +```ts +function queryAllByText(...args: [HTMLElement, Matcher, SelectorMatcherOptions]): ReturnType> +``` + +## Type Parameters + +| Type Parameter | Default type | +| ------ | ------ | +| `T` *extends* `HTMLElement` | `HTMLElement` | + +## Parameters + +| Parameter | Type | +| ------ | ------ | +| ...`args` | [`HTMLElement`, [`Matcher`](/api/reactlynx-testing-library/TypeAlias.Matcher.mdx), [`SelectorMatcherOptions`](/api/reactlynx-testing-library/queryHelpers.Interface.SelectorMatcherOptions.mdx)] | + +## Returns + +`ReturnType`\<[`AllByText`](/api/reactlynx-testing-library/TypeAlias.AllByText.mdx)\<`T`\>\> + +## Defined in + +index.d.ts:1094 diff --git a/docs/en/api/reactlynx-testing-library/Function.queryAllByTitle.mdx b/docs/en/api/reactlynx-testing-library/Function.queryAllByTitle.mdx new file mode 100644 index 000000000..b410a73fd --- /dev/null +++ b/docs/en/api/reactlynx-testing-library/Function.queryAllByTitle.mdx @@ -0,0 +1,37 @@ +{/* +* This file is generated by @lynx-js/tool-typedoc. +* Do not edit this file directly. +* @generated +*/} + +{/* Import all components as Lynx to allow dynamic lookup in TSDoc writings. */} +import * as Lynx from '@lynx'; + + +[reactlynx-testing-library](/api/reactlynx-testing-library/index.mdx) / queryAllByTitle + +# Function: queryAllByTitle() + +```ts +function queryAllByTitle(...args: [HTMLElement, Matcher, MatcherOptions]): ReturnType> +``` + +## Type Parameters + +| Type Parameter | Default type | +| ------ | ------ | +| `T` *extends* `HTMLElement` | `HTMLElement` | + +## Parameters + +| Parameter | Type | +| ------ | ------ | +| ...`args` | [`HTMLElement`, [`Matcher`](/api/reactlynx-testing-library/TypeAlias.Matcher.mdx), [`MatcherOptions`](/api/reactlynx-testing-library/Interface.MatcherOptions.mdx)] | + +## Returns + +`ReturnType`\<[`AllByBoundAttribute`](/api/reactlynx-testing-library/TypeAlias.AllByBoundAttribute.mdx)\<`T`\>\> + +## Defined in + +index.d.ts:1098 diff --git a/docs/en/api/reactlynx-testing-library/Function.queryByAltText.mdx b/docs/en/api/reactlynx-testing-library/Function.queryByAltText.mdx new file mode 100644 index 000000000..3bb7bd9db --- /dev/null +++ b/docs/en/api/reactlynx-testing-library/Function.queryByAltText.mdx @@ -0,0 +1,37 @@ +{/* +* This file is generated by @lynx-js/tool-typedoc. +* Do not edit this file directly. +* @generated +*/} + +{/* Import all components as Lynx to allow dynamic lookup in TSDoc writings. */} +import * as Lynx from '@lynx'; + + +[reactlynx-testing-library](/api/reactlynx-testing-library/index.mdx) / queryByAltText + +# Function: queryByAltText() + +```ts +function queryByAltText(...args: [HTMLElement, Matcher, MatcherOptions]): ReturnType> +``` + +## Type Parameters + +| Type Parameter | Default type | +| ------ | ------ | +| `T` *extends* `HTMLElement` | `HTMLElement` | + +## Parameters + +| Parameter | Type | +| ------ | ------ | +| ...`args` | [`HTMLElement`, [`Matcher`](/api/reactlynx-testing-library/TypeAlias.Matcher.mdx), [`MatcherOptions`](/api/reactlynx-testing-library/Interface.MatcherOptions.mdx)] | + +## Returns + +`ReturnType`\<[`QueryByBoundAttribute`](/api/reactlynx-testing-library/queries.TypeAlias.QueryByBoundAttribute.mdx)\<`T`\>\> + +## Defined in + +index.d.ts:1109 diff --git a/docs/en/api/reactlynx-testing-library/Function.queryByAttribute.mdx b/docs/en/api/reactlynx-testing-library/Function.queryByAttribute.mdx new file mode 100644 index 000000000..d5622ebcb --- /dev/null +++ b/docs/en/api/reactlynx-testing-library/Function.queryByAttribute.mdx @@ -0,0 +1,38 @@ +{/* +* This file is generated by @lynx-js/tool-typedoc. +* Do not edit this file directly. +* @generated +*/} + +{/* Import all components as Lynx to allow dynamic lookup in TSDoc writings. */} +import * as Lynx from '@lynx'; + + +[reactlynx-testing-library](/api/reactlynx-testing-library/index.mdx) / queryByAttribute + +# Function: queryByAttribute() + +```ts +function queryByAttribute( + attribute: string, + container: HTMLElement, + id: Matcher, + options?: MatcherOptions): any +``` + +## Parameters + +| Parameter | Type | +| ------ | ------ | +| `attribute` | `string` | +| `container` | `HTMLElement` | +| `id` | [`Matcher`](/api/reactlynx-testing-library/TypeAlias.Matcher.mdx) | +| `options`? | [`MatcherOptions`](/api/reactlynx-testing-library/Interface.MatcherOptions.mdx) | + +## Returns + +`any` + +## Defined in + +index.d.ts:1120 diff --git a/docs/en/api/reactlynx-testing-library/Function.queryByDisplayValue.mdx b/docs/en/api/reactlynx-testing-library/Function.queryByDisplayValue.mdx new file mode 100644 index 000000000..7a00aa2c4 --- /dev/null +++ b/docs/en/api/reactlynx-testing-library/Function.queryByDisplayValue.mdx @@ -0,0 +1,37 @@ +{/* +* This file is generated by @lynx-js/tool-typedoc. +* Do not edit this file directly. +* @generated +*/} + +{/* Import all components as Lynx to allow dynamic lookup in TSDoc writings. */} +import * as Lynx from '@lynx'; + + +[reactlynx-testing-library](/api/reactlynx-testing-library/index.mdx) / queryByDisplayValue + +# Function: queryByDisplayValue() + +```ts +function queryByDisplayValue(...args: [HTMLElement, Matcher, MatcherOptions]): ReturnType> +``` + +## Type Parameters + +| Type Parameter | Default type | +| ------ | ------ | +| `T` *extends* `HTMLElement` | `HTMLElement` | + +## Parameters + +| Parameter | Type | +| ------ | ------ | +| ...`args` | [`HTMLElement`, [`Matcher`](/api/reactlynx-testing-library/TypeAlias.Matcher.mdx), [`MatcherOptions`](/api/reactlynx-testing-library/Interface.MatcherOptions.mdx)] | + +## Returns + +`ReturnType`\<[`QueryByBoundAttribute`](/api/reactlynx-testing-library/queries.TypeAlias.QueryByBoundAttribute.mdx)\<`T`\>\> + +## Defined in + +index.d.ts:1128 diff --git a/docs/en/api/reactlynx-testing-library/Function.queryByLabelText.mdx b/docs/en/api/reactlynx-testing-library/Function.queryByLabelText.mdx new file mode 100644 index 000000000..cef7cb58d --- /dev/null +++ b/docs/en/api/reactlynx-testing-library/Function.queryByLabelText.mdx @@ -0,0 +1,37 @@ +{/* +* This file is generated by @lynx-js/tool-typedoc. +* Do not edit this file directly. +* @generated +*/} + +{/* Import all components as Lynx to allow dynamic lookup in TSDoc writings. */} +import * as Lynx from '@lynx'; + + +[reactlynx-testing-library](/api/reactlynx-testing-library/index.mdx) / queryByLabelText + +# Function: queryByLabelText() + +```ts +function queryByLabelText(...args: [HTMLElement, Matcher, SelectorMatcherOptions]): ReturnType> +``` + +## Type Parameters + +| Type Parameter | Default type | +| ------ | ------ | +| `T` *extends* `HTMLElement` | `HTMLElement` | + +## Parameters + +| Parameter | Type | +| ------ | ------ | +| ...`args` | [`HTMLElement`, [`Matcher`](/api/reactlynx-testing-library/TypeAlias.Matcher.mdx), [`SelectorMatcherOptions`](/api/reactlynx-testing-library/queryHelpers.Interface.SelectorMatcherOptions.mdx)] | + +## Returns + +`ReturnType`\<[`QueryByText`](/api/reactlynx-testing-library/queries.TypeAlias.QueryByText.mdx)\<`T`\>\> + +## Defined in + +index.d.ts:1132 diff --git a/docs/en/api/reactlynx-testing-library/Function.queryByPlaceholderText.mdx b/docs/en/api/reactlynx-testing-library/Function.queryByPlaceholderText.mdx new file mode 100644 index 000000000..8c4376a6a --- /dev/null +++ b/docs/en/api/reactlynx-testing-library/Function.queryByPlaceholderText.mdx @@ -0,0 +1,37 @@ +{/* +* This file is generated by @lynx-js/tool-typedoc. +* Do not edit this file directly. +* @generated +*/} + +{/* Import all components as Lynx to allow dynamic lookup in TSDoc writings. */} +import * as Lynx from '@lynx'; + + +[reactlynx-testing-library](/api/reactlynx-testing-library/index.mdx) / queryByPlaceholderText + +# Function: queryByPlaceholderText() + +```ts +function queryByPlaceholderText(...args: [HTMLElement, Matcher, MatcherOptions]): ReturnType> +``` + +## Type Parameters + +| Type Parameter | Default type | +| ------ | ------ | +| `T` *extends* `HTMLElement` | `HTMLElement` | + +## Parameters + +| Parameter | Type | +| ------ | ------ | +| ...`args` | [`HTMLElement`, [`Matcher`](/api/reactlynx-testing-library/TypeAlias.Matcher.mdx), [`MatcherOptions`](/api/reactlynx-testing-library/Interface.MatcherOptions.mdx)] | + +## Returns + +`ReturnType`\<[`QueryByBoundAttribute`](/api/reactlynx-testing-library/queries.TypeAlias.QueryByBoundAttribute.mdx)\<`T`\>\> + +## Defined in + +index.d.ts:1136 diff --git a/docs/en/api/reactlynx-testing-library/Function.queryByRole.mdx b/docs/en/api/reactlynx-testing-library/Function.queryByRole.mdx new file mode 100644 index 000000000..43ba4752f --- /dev/null +++ b/docs/en/api/reactlynx-testing-library/Function.queryByRole.mdx @@ -0,0 +1,37 @@ +{/* +* This file is generated by @lynx-js/tool-typedoc. +* Do not edit this file directly. +* @generated +*/} + +{/* Import all components as Lynx to allow dynamic lookup in TSDoc writings. */} +import * as Lynx from '@lynx'; + + +[reactlynx-testing-library](/api/reactlynx-testing-library/index.mdx) / queryByRole + +# Function: queryByRole() + +```ts +function queryByRole(...args: [HTMLElement, any, ByRoleOptions]): ReturnType> +``` + +## Type Parameters + +| Type Parameter | Default type | +| ------ | ------ | +| `T` *extends* `HTMLElement` | `HTMLElement` | + +## Parameters + +| Parameter | Type | +| ------ | ------ | +| ...`args` | [`HTMLElement`, `any`, [`ByRoleOptions`](/api/reactlynx-testing-library/Interface.ByRoleOptions.mdx)] | + +## Returns + +`ReturnType`\<[`QueryByRole`](/api/reactlynx-testing-library/queries.TypeAlias.QueryByRole.mdx)\<`T`\>\> + +## Defined in + +index.d.ts:1146 diff --git a/docs/en/api/reactlynx-testing-library/Function.queryByTestId.mdx b/docs/en/api/reactlynx-testing-library/Function.queryByTestId.mdx new file mode 100644 index 000000000..12afe463b --- /dev/null +++ b/docs/en/api/reactlynx-testing-library/Function.queryByTestId.mdx @@ -0,0 +1,37 @@ +{/* +* This file is generated by @lynx-js/tool-typedoc. +* Do not edit this file directly. +* @generated +*/} + +{/* Import all components as Lynx to allow dynamic lookup in TSDoc writings. */} +import * as Lynx from '@lynx'; + + +[reactlynx-testing-library](/api/reactlynx-testing-library/index.mdx) / queryByTestId + +# Function: queryByTestId() + +```ts +function queryByTestId(...args: [HTMLElement, Matcher, MatcherOptions]): ReturnType> +``` + +## Type Parameters + +| Type Parameter | Default type | +| ------ | ------ | +| `T` *extends* `HTMLElement` | `HTMLElement` | + +## Parameters + +| Parameter | Type | +| ------ | ------ | +| ...`args` | [`HTMLElement`, [`Matcher`](/api/reactlynx-testing-library/TypeAlias.Matcher.mdx), [`MatcherOptions`](/api/reactlynx-testing-library/Interface.MatcherOptions.mdx)] | + +## Returns + +`ReturnType`\<[`QueryByBoundAttribute`](/api/reactlynx-testing-library/queries.TypeAlias.QueryByBoundAttribute.mdx)\<`T`\>\> + +## Defined in + +index.d.ts:1150 diff --git a/docs/en/api/reactlynx-testing-library/Function.queryByText.mdx b/docs/en/api/reactlynx-testing-library/Function.queryByText.mdx new file mode 100644 index 000000000..c5f786147 --- /dev/null +++ b/docs/en/api/reactlynx-testing-library/Function.queryByText.mdx @@ -0,0 +1,37 @@ +{/* +* This file is generated by @lynx-js/tool-typedoc. +* Do not edit this file directly. +* @generated +*/} + +{/* Import all components as Lynx to allow dynamic lookup in TSDoc writings. */} +import * as Lynx from '@lynx'; + + +[reactlynx-testing-library](/api/reactlynx-testing-library/index.mdx) / queryByText + +# Function: queryByText() + +```ts +function queryByText(...args: [HTMLElement, Matcher, SelectorMatcherOptions]): ReturnType> +``` + +## Type Parameters + +| Type Parameter | Default type | +| ------ | ------ | +| `T` *extends* `HTMLElement` | `HTMLElement` | + +## Parameters + +| Parameter | Type | +| ------ | ------ | +| ...`args` | [`HTMLElement`, [`Matcher`](/api/reactlynx-testing-library/TypeAlias.Matcher.mdx), [`SelectorMatcherOptions`](/api/reactlynx-testing-library/queryHelpers.Interface.SelectorMatcherOptions.mdx)] | + +## Returns + +`ReturnType`\<[`QueryByText`](/api/reactlynx-testing-library/queries.TypeAlias.QueryByText.mdx)\<`T`\>\> + +## Defined in + +index.d.ts:1160 diff --git a/docs/en/api/reactlynx-testing-library/Function.queryByTitle.mdx b/docs/en/api/reactlynx-testing-library/Function.queryByTitle.mdx new file mode 100644 index 000000000..c3628d316 --- /dev/null +++ b/docs/en/api/reactlynx-testing-library/Function.queryByTitle.mdx @@ -0,0 +1,37 @@ +{/* +* This file is generated by @lynx-js/tool-typedoc. +* Do not edit this file directly. +* @generated +*/} + +{/* Import all components as Lynx to allow dynamic lookup in TSDoc writings. */} +import * as Lynx from '@lynx'; + + +[reactlynx-testing-library](/api/reactlynx-testing-library/index.mdx) / queryByTitle + +# Function: queryByTitle() + +```ts +function queryByTitle(...args: [HTMLElement, Matcher, MatcherOptions]): ReturnType> +``` + +## Type Parameters + +| Type Parameter | Default type | +| ------ | ------ | +| `T` *extends* `HTMLElement` | `HTMLElement` | + +## Parameters + +| Parameter | Type | +| ------ | ------ | +| ...`args` | [`HTMLElement`, [`Matcher`](/api/reactlynx-testing-library/TypeAlias.Matcher.mdx), [`MatcherOptions`](/api/reactlynx-testing-library/Interface.MatcherOptions.mdx)] | + +## Returns + +`ReturnType`\<[`QueryByBoundAttribute`](/api/reactlynx-testing-library/queries.TypeAlias.QueryByBoundAttribute.mdx)\<`T`\>\> + +## Defined in + +index.d.ts:1164 diff --git a/docs/en/api/reactlynx-testing-library/Function.render.mdx b/docs/en/api/reactlynx-testing-library/Function.render.mdx new file mode 100644 index 000000000..e13911b21 --- /dev/null +++ b/docs/en/api/reactlynx-testing-library/Function.render.mdx @@ -0,0 +1,67 @@ +{/* +* This file is generated by @lynx-js/tool-typedoc. +* Do not edit this file directly. +* @generated +*/} + +{/* Import all components as Lynx to allow dynamic lookup in TSDoc writings. */} +import * as Lynx from '@lynx'; + + +[reactlynx-testing-library](/api/reactlynx-testing-library/index.mdx) / render + +# Function: render() + +```ts +function render(ui: ComponentChild, options?: RenderOptions): RenderResult +``` + +Render into the page. It should be used with cleanup. + +## Type Parameters + +| Type Parameter | +| ------ | +| `Q` *extends* [`Queries`](/api/reactlynx-testing-library/Interface.Queries.mdx) | + +## Parameters + +| Parameter | Type | +| ------ | ------ | +| `ui` | `ComponentChild` | +| `options`? | [`RenderOptions`](/api/reactlynx-testing-library/Interface.RenderOptions.mdx)\<`Q`\> | + +## Returns + +[`RenderResult`](/api/reactlynx-testing-library/TypeAlias.RenderResult.mdx)\<`Q`\> + +## Example + +```ts +import { render} from '@lynx-js/react/testing-library' + +const WrapperComponent = ({ children }) => ( + {children} +); +const Comp = () => { + return ; +}; +const { container, getByTestId } = render(, { + wrapper: WrapperComponent, +}); +expect(getByTestId('wrapper')).toBeInTheDocument(); +expect(container.firstChild).toMatchInlineSnapshot(` + + + +`); +``` + +## Defined in + +index.d.ts:1234 diff --git a/docs/en/api/reactlynx-testing-library/Function.renderHook.mdx b/docs/en/api/reactlynx-testing-library/Function.renderHook.mdx new file mode 100644 index 000000000..21ff3c0fe --- /dev/null +++ b/docs/en/api/reactlynx-testing-library/Function.renderHook.mdx @@ -0,0 +1,63 @@ +{/* +* This file is generated by @lynx-js/tool-typedoc. +* Do not edit this file directly. +* @generated +*/} + +{/* Import all components as Lynx to allow dynamic lookup in TSDoc writings. */} +import * as Lynx from '@lynx'; + + +[reactlynx-testing-library](/api/reactlynx-testing-library/index.mdx) / renderHook + +# Function: renderHook() + +```ts +function renderHook(render: (initialProps: Props) => Result, options?: RenderHookOptions): RenderHookResult +``` + +Allows you to render a hook within a test React component without having to +create that component yourself. + +## Type Parameters + +| Type Parameter | +| ------ | +| `Result` | +| `Props` | + +## Parameters + +| Parameter | Type | +| ------ | ------ | +| `render` | (`initialProps`: `Props`) => `Result` | +| `options`? | [`RenderHookOptions`](/api/reactlynx-testing-library/Interface.RenderHookOptions.mdx)\<`Props`\> | + +## Returns + +[`RenderHookResult`](/api/reactlynx-testing-library/Interface.RenderHookResult.mdx)\<`Result`, `Props`\> + +## Example + +```ts +import { renderHook } from '@lynx-js/react/testing-library' + +const Context = createContext('default'); +function Wrapper({ children }) { + return {children}; +} +const { result } = renderHook( + () => { + return useContext(Context); + }, + { + wrapper: Wrapper, + }, +); + +expect(result.current).toEqual('provided'); +``` + +## Defined in + +index.d.ts:1266 diff --git a/docs/en/api/reactlynx-testing-library/Function.waitFor.mdx b/docs/en/api/reactlynx-testing-library/Function.waitFor.mdx new file mode 100644 index 000000000..a0d241c5f --- /dev/null +++ b/docs/en/api/reactlynx-testing-library/Function.waitFor.mdx @@ -0,0 +1,38 @@ +{/* +* This file is generated by @lynx-js/tool-typedoc. +* Do not edit this file directly. +* @generated +*/} + +{/* Import all components as Lynx to allow dynamic lookup in TSDoc writings. */} +import * as Lynx from '@lynx'; + + +[reactlynx-testing-library](/api/reactlynx-testing-library/index.mdx) / waitFor + +# Function: waitFor() + +```ts +function waitFor(callback: () => T | Promise, options?: waitForOptions): Promise +``` + +## Type Parameters + +| Type Parameter | +| ------ | +| `T` | + +## Parameters + +| Parameter | Type | +| ------ | ------ | +| `callback` | () => `T` \| `Promise`\<`T`\> | +| `options`? | [`waitForOptions`](/api/reactlynx-testing-library/Interface.waitForOptions.mdx) | + +## Returns + +`Promise`\<`T`\> + +## Defined in + +index.d.ts:1473 diff --git a/docs/en/api/reactlynx-testing-library/Function.waitForElementToBeRemoved.mdx b/docs/en/api/reactlynx-testing-library/Function.waitForElementToBeRemoved.mdx new file mode 100644 index 000000000..67a31b699 --- /dev/null +++ b/docs/en/api/reactlynx-testing-library/Function.waitForElementToBeRemoved.mdx @@ -0,0 +1,38 @@ +{/* +* This file is generated by @lynx-js/tool-typedoc. +* Do not edit this file directly. +* @generated +*/} + +{/* Import all components as Lynx to allow dynamic lookup in TSDoc writings. */} +import * as Lynx from '@lynx'; + + +[reactlynx-testing-library](/api/reactlynx-testing-library/index.mdx) / waitForElementToBeRemoved + +# Function: waitForElementToBeRemoved() + +```ts +function waitForElementToBeRemoved(callback: T | () => T, options?: waitForOptions): Promise +``` + +## Type Parameters + +| Type Parameter | +| ------ | +| `T` | + +## Parameters + +| Parameter | Type | +| ------ | ------ | +| `callback` | `T` \| () => `T` | +| `options`? | [`waitForOptions`](/api/reactlynx-testing-library/Interface.waitForOptions.mdx) | + +## Returns + +`Promise`\<`void`\> + +## Defined in + +index.d.ts:1478 diff --git a/docs/en/api/reactlynx-testing-library/Function.waitSchedule.mdx b/docs/en/api/reactlynx-testing-library/Function.waitSchedule.mdx new file mode 100644 index 000000000..91ea34a38 --- /dev/null +++ b/docs/en/api/reactlynx-testing-library/Function.waitSchedule.mdx @@ -0,0 +1,29 @@ +{/* +* This file is generated by @lynx-js/tool-typedoc. +* Do not edit this file directly. +* @generated +*/} + +{/* Import all components as Lynx to allow dynamic lookup in TSDoc writings. */} +import * as Lynx from '@lynx'; + + +[reactlynx-testing-library](/api/reactlynx-testing-library/index.mdx) / waitSchedule + +# Function: waitSchedule() + +```ts +function waitSchedule(): Promise +``` + +Wait for the next event loop. + +It will be useful when you want to wait for the next event loop to finish. + +## Returns + +`Promise`\<`void`\> + +## Defined in + +index.d.ts:1498 diff --git a/docs/en/api/reactlynx-testing-library/Function.within.mdx b/docs/en/api/reactlynx-testing-library/Function.within.mdx new file mode 100644 index 000000000..777cc4b57 --- /dev/null +++ b/docs/en/api/reactlynx-testing-library/Function.within.mdx @@ -0,0 +1,39 @@ +{/* +* This file is generated by @lynx-js/tool-typedoc. +* Do not edit this file directly. +* @generated +*/} + +{/* Import all components as Lynx to allow dynamic lookup in TSDoc writings. */} +import * as Lynx from '@lynx'; + + +[reactlynx-testing-library](/api/reactlynx-testing-library/index.mdx) / within + +# Function: within() + +```ts +function within(element: HTMLElement, queriesToBind?: T): BoundFunctions +``` + +## Type Parameters + +| Type Parameter | Default type | +| ------ | ------ | +| `QueriesToBind` *extends* [`Queries`](/api/reactlynx-testing-library/Interface.Queries.mdx) | *typeof* [`queries`](/api/reactlynx-testing-library/Namespace.queries.mdx) | +| `T` *extends* [`Queries`](/api/reactlynx-testing-library/Interface.Queries.mdx) | `QueriesToBind` | + +## Parameters + +| Parameter | Type | +| ------ | ------ | +| `element` | `HTMLElement` | +| `queriesToBind`? | `T` | + +## Returns + +[`BoundFunctions`](/api/reactlynx-testing-library/TypeAlias.BoundFunctions.mdx)\<`T`\> + +## Defined in + +index.d.ts:1500 diff --git a/docs/en/api/reactlynx-testing-library/Interface.ByRoleOptions.mdx b/docs/en/api/reactlynx-testing-library/Interface.ByRoleOptions.mdx new file mode 100644 index 000000000..97a991b1b --- /dev/null +++ b/docs/en/api/reactlynx-testing-library/Interface.ByRoleOptions.mdx @@ -0,0 +1,227 @@ +{/* +* This file is generated by @lynx-js/tool-typedoc. +* Do not edit this file directly. +* @generated +*/} + +{/* Import all components as Lynx to allow dynamic lookup in TSDoc writings. */} +import * as Lynx from '@lynx'; + + +[reactlynx-testing-library](/api/reactlynx-testing-library/index.mdx) / ByRoleOptions + +# Interface: ByRoleOptions + +## Properties + +### busy? + +```ts +optional busy: boolean; +``` + +If true only includes elements in the query set that are marked as +busy in the accessibility tree, i.e., `aria-busy="true"` + +#### Defined in + +index.d.ts:227 + +*** + +### checked? + +```ts +optional checked: boolean; +``` + +If true only includes elements in the query set that are marked as +checked in the accessibility tree, i.e., `aria-checked="true"` + +#### Defined in + +index.d.ts:232 + +*** + +### current? + +```ts +optional current: string | boolean; +``` + +Filters elements by their `aria-current` state. `true` and `false` match `aria-current="true"` and `aria-current="false"` (as well as a missing `aria-current` attribute) respectively. + +#### Defined in + +index.d.ts:241 + +*** + +### description? + +```ts +optional description: string | RegExp | (accessibleDescription: string, element: Element) => boolean; +``` + +Only considers elements with the specified accessible description. + +#### Defined in + +index.d.ts:274 + +*** + +### expanded? + +```ts +optional expanded: boolean; +``` + +If true only includes elements in the query set that are marked as +expanded in the accessibility tree, i.e., `aria-expanded="true"` + +#### Defined in + +index.d.ts:246 + +*** + +### hidden? + +```ts +optional hidden: boolean; +``` + +If true includes elements in the query set that are usually excluded from +the accessibility tree. `role="none"` or `role="presentation"` are included +in either case. + +#### Defined in + +index.d.ts:217 + +*** + +### level? + +```ts +optional level: number; +``` + +Includes elements with the `"heading"` role matching the indicated level, +either by the semantic HTML heading elements `

-

` or matching +the `aria-level` attribute. + +#### Defined in + +index.d.ts:252 + +*** + +### name? + +```ts +optional name: string | RegExp | (accessibleName: string, element: Element) => boolean; +``` + +Only considers elements with the specified accessible name. + +#### Defined in + +index.d.ts:267 + +*** + +### pressed? + +```ts +optional pressed: boolean; +``` + +If true only includes elements in the query set that are marked as +pressed in the accessibility tree, i.e., `aria-pressed="true"` + +#### Defined in + +index.d.ts:237 + +*** + +### queryFallbacks? + +```ts +optional queryFallbacks: boolean; +``` + +Includes every role used in the `role` attribute +For example *ByRole('progressbar', \{queryFallbacks: true\})` will find
`. + +#### Defined in + +index.d.ts:263 + +*** + +### selected? + +```ts +optional selected: boolean; +``` + +If true only includes elements in the query set that are marked as +selected in the accessibility tree, i.e., `aria-selected="true"` + +#### Defined in + +index.d.ts:222 + +*** + +### suggest? + +```ts +optional suggest: boolean; +``` + +suppress suggestions for a specific query + +#### Defined in + +index.d.ts:211 + +*** + +### value? + +```ts +optional value: object; +``` + +#### max? + +```ts +optional max: number; +``` + +#### min? + +```ts +optional min: number; +``` + +#### now? + +```ts +optional now: number; +``` + +#### text? + +```ts +optional text: Matcher; +``` + +#### Defined in + +index.d.ts:253 diff --git a/docs/en/api/reactlynx-testing-library/Interface.Config.mdx b/docs/en/api/reactlynx-testing-library/Interface.Config.mdx new file mode 100644 index 000000000..c16c20be3 --- /dev/null +++ b/docs/en/api/reactlynx-testing-library/Interface.Config.mdx @@ -0,0 +1,190 @@ +{/* +* This file is generated by @lynx-js/tool-typedoc. +* Do not edit this file directly. +* @generated +*/} + +{/* Import all components as Lynx to allow dynamic lookup in TSDoc writings. */} +import * as Lynx from '@lynx'; + + +[reactlynx-testing-library](/api/reactlynx-testing-library/index.mdx) / Config + +# Interface: Config + +## Properties + +### asyncUtilTimeout + +```ts +asyncUtilTimeout: number; +``` + +#### Defined in + +index.d.ts:300 + +*** + +### computedStyleSupportsPseudoElements + +```ts +computedStyleSupportsPseudoElements: boolean; +``` + +#### Defined in + +index.d.ts:301 + +*** + +### defaultHidden + +```ts +defaultHidden: boolean; +``` + +#### Defined in + +index.d.ts:302 + +*** + +### defaultIgnore + +```ts +defaultIgnore: string; +``` + +default value for the `ignore` option in `ByText` queries + +#### Defined in + +index.d.ts:304 + +*** + +### getElementError() + +```ts +getElementError: (message: null | string, container: Element) => Error; +``` + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `message` | `null` \| `string` | +| `container` | `Element` | + +#### Returns + +`Error` + +#### Defined in + +index.d.ts:307 + +*** + +### showOriginalStackTrace + +```ts +showOriginalStackTrace: boolean; +``` + +#### Defined in + +index.d.ts:305 + +*** + +### testIdAttribute + +```ts +testIdAttribute: string; +``` + +#### Defined in + +index.d.ts:290 + +*** + +### throwSuggestions + +```ts +throwSuggestions: boolean; +``` + +#### Defined in + +index.d.ts:306 + +## Methods + +### asyncWrapper() + +```ts +asyncWrapper(cb: (...args: any[]) => any): Promise +``` + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `cb` | (...`args`: `any`[]) => `any` | + +#### Returns + +`Promise`\<`any`\> + +#### Defined in + +index.d.ts:297 + +*** + +### eventWrapper() + +```ts +eventWrapper(cb: (...args: any[]) => any): void +``` + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `cb` | (...`args`: `any`[]) => `any` | + +#### Returns + +`void` + +#### Defined in + +index.d.ts:299 + +*** + +### unstable\_advanceTimersWrapper() + +```ts +unstable_advanceTimersWrapper(cb: (...args: unknown[]) => unknown): unknown +``` + +WARNING: `unstable` prefix means this API may change in patch and minor releases. + +#### Parameters + +| Parameter | Type | Description | +| ------ | ------ | ------ | +| `cb` | (...`args`: `unknown`[]) => `unknown` | | + +#### Returns + +`unknown` + +#### Defined in + +index.d.ts:295 diff --git a/docs/en/api/reactlynx-testing-library/Interface.ConfigFn.mdx b/docs/en/api/reactlynx-testing-library/Interface.ConfigFn.mdx new file mode 100644 index 000000000..03f5ffc2d --- /dev/null +++ b/docs/en/api/reactlynx-testing-library/Interface.ConfigFn.mdx @@ -0,0 +1,31 @@ +{/* +* This file is generated by @lynx-js/tool-typedoc. +* Do not edit this file directly. +* @generated +*/} + +{/* Import all components as Lynx to allow dynamic lookup in TSDoc writings. */} +import * as Lynx from '@lynx'; + + +[reactlynx-testing-library](/api/reactlynx-testing-library/index.mdx) / ConfigFn + +# Interface: ConfigFn() + +```ts +interface ConfigFn(existingConfig: Config): Partial +``` + +## Parameters + +| Parameter | Type | +| ------ | ------ | +| `existingConfig` | [`Config`](/api/reactlynx-testing-library/Interface.Config.mdx) | + +## Returns + +`Partial`\<[`Config`](/api/reactlynx-testing-library/Interface.Config.mdx)\> + +## Defined in + +index.d.ts:311 diff --git a/docs/en/api/reactlynx-testing-library/Interface.DefaultNormalizerOptions.mdx b/docs/en/api/reactlynx-testing-library/Interface.DefaultNormalizerOptions.mdx new file mode 100644 index 000000000..23aa7d912 --- /dev/null +++ b/docs/en/api/reactlynx-testing-library/Interface.DefaultNormalizerOptions.mdx @@ -0,0 +1,41 @@ +{/* +* This file is generated by @lynx-js/tool-typedoc. +* Do not edit this file directly. +* @generated +*/} + +{/* Import all components as Lynx to allow dynamic lookup in TSDoc writings. */} +import * as Lynx from '@lynx'; + + +[reactlynx-testing-library](/api/reactlynx-testing-library/index.mdx) / DefaultNormalizerOptions + +# Interface: DefaultNormalizerOptions + +## Extended by + +- [`NormalizerOptions`](/api/reactlynx-testing-library/Interface.NormalizerOptions.mdx) + +## Properties + +### collapseWhitespace? + +```ts +optional collapseWhitespace: boolean; +``` + +#### Defined in + +index.d.ts:334 + +*** + +### trim? + +```ts +optional trim: boolean; +``` + +#### Defined in + +index.d.ts:333 diff --git a/docs/en/api/reactlynx-testing-library/Interface.LogRolesOptions.mdx b/docs/en/api/reactlynx-testing-library/Interface.LogRolesOptions.mdx new file mode 100644 index 000000000..95ef4a801 --- /dev/null +++ b/docs/en/api/reactlynx-testing-library/Interface.LogRolesOptions.mdx @@ -0,0 +1,25 @@ +{/* +* This file is generated by @lynx-js/tool-typedoc. +* Do not edit this file directly. +* @generated +*/} + +{/* Import all components as Lynx to allow dynamic lookup in TSDoc writings. */} +import * as Lynx from '@lynx'; + + +[reactlynx-testing-library](/api/reactlynx-testing-library/index.mdx) / LogRolesOptions + +# Interface: LogRolesOptions + +## Properties + +### hidden? + +```ts +optional hidden: boolean; +``` + +#### Defined in + +index.d.ts:787 diff --git a/docs/en/api/reactlynx-testing-library/Interface.MatcherOptions.mdx b/docs/en/api/reactlynx-testing-library/Interface.MatcherOptions.mdx new file mode 100644 index 000000000..4718ec4d1 --- /dev/null +++ b/docs/en/api/reactlynx-testing-library/Interface.MatcherOptions.mdx @@ -0,0 +1,83 @@ +{/* +* This file is generated by @lynx-js/tool-typedoc. +* Do not edit this file directly. +* @generated +*/} + +{/* Import all components as Lynx to allow dynamic lookup in TSDoc writings. */} +import * as Lynx from '@lynx'; + + +[reactlynx-testing-library](/api/reactlynx-testing-library/index.mdx) / MatcherOptions + +# Interface: MatcherOptions + +## Extended by + +- [`SelectorMatcherOptions`](/api/reactlynx-testing-library/queryHelpers.Interface.SelectorMatcherOptions.mdx) + +## Properties + +### collapseWhitespace? + +```ts +optional collapseWhitespace: boolean; +``` + +Use normalizer with getDefaultNormalizer instead + +#### Defined in + +index.d.ts:932 + +*** + +### exact? + +```ts +optional exact: boolean; +``` + +#### Defined in + +index.d.ts:928 + +*** + +### normalizer? + +```ts +optional normalizer: NormalizerFn; +``` + +#### Defined in + +index.d.ts:933 + +*** + +### suggest? + +```ts +optional suggest: boolean; +``` + +suppress suggestions for a specific query + +#### Defined in + +index.d.ts:935 + +*** + +### trim? + +```ts +optional trim: boolean; +``` + +Use normalizer with getDefaultNormalizer instead + +#### Defined in + +index.d.ts:930 diff --git a/docs/en/api/reactlynx-testing-library/Interface.NormalizerOptions.mdx b/docs/en/api/reactlynx-testing-library/Interface.NormalizerOptions.mdx new file mode 100644 index 000000000..008400764 --- /dev/null +++ b/docs/en/api/reactlynx-testing-library/Interface.NormalizerOptions.mdx @@ -0,0 +1,61 @@ +{/* +* This file is generated by @lynx-js/tool-typedoc. +* Do not edit this file directly. +* @generated +*/} + +{/* Import all components as Lynx to allow dynamic lookup in TSDoc writings. */} +import * as Lynx from '@lynx'; + + +[reactlynx-testing-library](/api/reactlynx-testing-library/index.mdx) / NormalizerOptions + +# Interface: NormalizerOptions + +## Extends + +- [`DefaultNormalizerOptions`](/api/reactlynx-testing-library/Interface.DefaultNormalizerOptions.mdx) + +## Properties + +### collapseWhitespace? + +```ts +optional collapseWhitespace: boolean; +``` + +#### Inherited from + +[`DefaultNormalizerOptions`](/api/reactlynx-testing-library/Interface.DefaultNormalizerOptions.mdx).[`collapseWhitespace`](/api/reactlynx-testing-library/Interface.DefaultNormalizerOptions.mdx#collapsewhitespace) + +#### Defined in + +index.d.ts:334 + +*** + +### normalizer? + +```ts +optional normalizer: NormalizerFn; +``` + +#### Defined in + +index.d.ts:959 + +*** + +### trim? + +```ts +optional trim: boolean; +``` + +#### Inherited from + +[`DefaultNormalizerOptions`](/api/reactlynx-testing-library/Interface.DefaultNormalizerOptions.mdx).[`trim`](/api/reactlynx-testing-library/Interface.DefaultNormalizerOptions.mdx#trim) + +#### Defined in + +index.d.ts:333 diff --git a/docs/en/api/reactlynx-testing-library/Interface.PrettyDOMOptions.mdx b/docs/en/api/reactlynx-testing-library/Interface.PrettyDOMOptions.mdx new file mode 100644 index 000000000..0937125c7 --- /dev/null +++ b/docs/en/api/reactlynx-testing-library/Interface.PrettyDOMOptions.mdx @@ -0,0 +1,42 @@ +{/* +* This file is generated by @lynx-js/tool-typedoc. +* Do not edit this file directly. +* @generated +*/} + +{/* Import all components as Lynx to allow dynamic lookup in TSDoc writings. */} +import * as Lynx from '@lynx'; + + +[reactlynx-testing-library](/api/reactlynx-testing-library/index.mdx) / PrettyDOMOptions + +# Interface: PrettyDOMOptions + +## Extends + +- [`prettyFormat`](/api/reactlynx-testing-library/Variable.prettyFormat.mdx) + +## Properties + +### filterNode()? + +```ts +optional filterNode: (node: Node) => boolean; +``` + +Given a `Node` return `false` if you wish to ignore that node in the output. +By default, ignores `