File tree Expand file tree Collapse file tree 2 files changed +34
-0
lines changed
chartlets.js/packages/lib/src/plugins Expand file tree Collapse file tree 2 files changed +34
-0
lines changed Original file line number Diff line number Diff line change 1+ import { describe , it , expect } from "vitest" ;
2+ import mui from "./index" ;
3+
4+ describe ( "mui Plugin" , ( ) => {
5+ it ( "registers components" , ( ) => {
6+ const plugin = mui ( ) ;
7+ expect ( plugin ) . toBeTypeOf ( "object" ) ;
8+ expect ( Array . isArray ( plugin . components ) ) . toBe ( true ) ;
9+ expect ( plugin . components ?. length ) . toBeGreaterThan ( 0 ) ;
10+ plugin . components ?. forEach ( ( componentRegistration ) => {
11+ expect ( componentRegistration ) . toHaveLength ( 2 ) ;
12+ const [ name , component ] = componentRegistration ;
13+ expect ( name ) . toBeTypeOf ( "string" ) ;
14+ expect ( component ) . toBeTypeOf ( "function" ) ;
15+ } ) ;
16+ } ) ;
17+ } ) ;
Original file line number Diff line number Diff line change 1+ import { describe , it , expect } from "vitest" ;
2+ import vega from "./index" ;
3+
4+ describe ( "vega Plugin" , ( ) => {
5+ it ( "registers components" , ( ) => {
6+ const plugin = vega ( ) ;
7+ expect ( plugin ) . toBeTypeOf ( "object" ) ;
8+ expect ( Array . isArray ( plugin . components ) ) . toBe ( true ) ;
9+ expect ( plugin . components ?. length ) . toBeGreaterThan ( 0 ) ;
10+ plugin . components ?. forEach ( ( componentRegistration ) => {
11+ expect ( componentRegistration ) . toHaveLength ( 2 ) ;
12+ const [ name , component ] = componentRegistration ;
13+ expect ( name ) . toBeTypeOf ( "string" ) ;
14+ expect ( component ) . toBeTypeOf ( "function" ) ;
15+ } ) ;
16+ } ) ;
17+ } ) ;
You can’t perform that action at this time.
0 commit comments