11import React from "react" ;
22import ReactDOM from "react-dom" ;
33import ContentDescriptor from "./ContentDescriptor" ;
4- import { types } from "@open-rpc/meta-schema" ;
4+ import { ContentDescriptorObject } from "@open-rpc/meta-schema" ;
55
66it ( "renders without crashing" , ( ) => {
77 const div = document . createElement ( "div" ) ;
@@ -18,15 +18,15 @@ it("renders empty with no schema", () => {
1818
1919it ( "renders empty with empty schema" , ( ) => {
2020 const div = document . createElement ( "div" ) ;
21- const emptyContentDescriptor = { } as types . ContentDescriptorObject ;
21+ const emptyContentDescriptor = { } as ContentDescriptorObject ;
2222 ReactDOM . render ( < ContentDescriptor contentDescriptor = { emptyContentDescriptor } /> , div ) ;
2323 expect ( div . innerHTML ) . toBe ( "" ) ;
2424 ReactDOM . unmountComponentAtNode ( div ) ;
2525} ) ;
2626
2727it ( "renders a name" , ( ) => {
2828 const div = document . createElement ( "div" ) ;
29- ReactDOM . render ( < ContentDescriptor contentDescriptor = { { name : "foo" } } /> , div ) ;
29+ ReactDOM . render ( < ContentDescriptor contentDescriptor = { { name : "foo" , schema : { } } } /> , div ) ;
3030 expect ( div . innerHTML . includes ( "foo" ) ) . toBe ( true ) ;
3131 ReactDOM . unmountComponentAtNode ( div ) ;
3232} ) ;
0 commit comments