File tree Expand file tree Collapse file tree 1 file changed +9
-0
lines changed Expand file tree Collapse file tree 1 file changed +9
-0
lines changed Original file line number Diff line number Diff line change @@ -14,6 +14,9 @@ const barPlugin = (test: Base) => {
14
14
bar : ( ) => "bar"
15
15
} ;
16
16
} ;
17
+ const pluginWithEmptyObjectReturn = ( test : Base ) => {
18
+ return { }
19
+ }
17
20
18
21
describe ( "Base" , ( ) => {
19
22
it ( ".plugin(fooPlugin)" , ( ) => {
@@ -27,6 +30,12 @@ describe("Base", () => {
27
30
expect ( fooBarTest . foo ( ) ) . toEqual ( "foo" ) ;
28
31
expect ( fooBarTest . bar ( ) ) . toEqual ( "bar" ) ;
29
32
} ) ;
33
+ it ( ".plugin([fooPlugin, barPlugin, pluginWithVoidReturn])" , ( ) => {
34
+ const FooBarTest = Base . plugin ( [ fooPlugin , barPlugin , pluginWithEmptyObjectReturn ] ) ;
35
+ const fooBarTest = new FooBarTest ( ) ;
36
+ expect ( fooBarTest . foo ( ) ) . toEqual ( "foo" ) ;
37
+ expect ( fooBarTest . bar ( ) ) . toEqual ( "bar" ) ;
38
+ } ) ;
30
39
it ( ".plugin(fooPlugin).plugin(barPlugin)" , ( ) => {
31
40
const FooBarTest = Base . plugin ( fooPlugin ) . plugin ( barPlugin ) ;
32
41
const fooBarTest = new FooBarTest ( ) ;
You can’t perform that action at this time.
0 commit comments