@@ -3,6 +3,21 @@ import ReactDOM from "react-dom";
3
3
import ExamplePairing from "./ExamplePairing" ;
4
4
import examples from "@open-rpc/examples" ;
5
5
import refParser from "json-schema-ref-parser" ;
6
+ import { OpenrpcDocument } from "@open-rpc/meta-schema" ;
7
+
8
+ it ( "renders handles no method" , async ( ) => {
9
+ const div = document . createElement ( "div" ) ;
10
+ ReactDOM . render ( < ExamplePairing method = { undefined } examplePosition = { 0 } /> , div ) ;
11
+ expect ( div . innerHTML ) . toBe ( "" ) ;
12
+ ReactDOM . unmountComponentAtNode ( div ) ;
13
+ } ) ;
14
+
15
+ it ( "renders handles no method examples" , async ( ) => {
16
+ const div = document . createElement ( "div" ) ;
17
+ ReactDOM . render ( < ExamplePairing method = { { } as any } examplePosition = { 0 } /> , div ) ;
18
+ expect ( div . innerHTML ) . toBe ( "" ) ;
19
+ ReactDOM . unmountComponentAtNode ( div ) ;
20
+ } ) ;
6
21
7
22
it ( "renders handles no examplePosition" , async ( ) => {
8
23
const div = document . createElement ( "div" ) ;
@@ -11,7 +26,6 @@ it("renders handles no examplePosition", async () => {
11
26
expect ( div . innerHTML ) . toBe ( "" ) ;
12
27
ReactDOM . unmountComponentAtNode ( div ) ;
13
28
} ) ;
14
- import { OpenrpcDocument } from "@open-rpc/meta-schema" ;
15
29
16
30
it ( "renders examples" , async ( ) => {
17
31
const div = document . createElement ( "div" ) ;
0 commit comments