File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -113,7 +113,7 @@ describe('runCodegen', () => {
113113 expect ( mockGenerateSwift ) . not . toHaveBeenCalled ( ) ;
114114 } ) ;
115115
116- it ( 'generates only swift by default even when kotlin is configured' , async ( ) => {
116+ it ( 'generates swift and kotlin by default when kotlin is configured' , async ( ) => {
117117 tempDir = createTempPackageJson ( {
118118 brownie : {
119119 kotlin : './Generated' ,
@@ -124,7 +124,13 @@ describe('runCodegen', () => {
124124 await runCodegen ( { } ) ;
125125
126126 expect ( mockGenerateSwift ) . toHaveBeenCalled ( ) ;
127- expect ( mockGenerateKotlin ) . not . toHaveBeenCalled ( ) ;
127+ expect ( mockGenerateKotlin ) . toHaveBeenCalledWith ( {
128+ name : 'TestStore' ,
129+ schemaPath : '/path/to/TestStore.brownie.ts' ,
130+ typeName : 'TestStore' ,
131+ outputPath : 'Generated/TestStore.kt' ,
132+ packageName : undefined ,
133+ } ) ;
128134 } ) ;
129135
130136 it ( 'generates only specified platform' , async ( ) => {
Original file line number Diff line number Diff line change @@ -142,8 +142,8 @@ export const codegenCommand = new Command('codegen')
142142 . addOption (
143143 new Option (
144144 '-p, --platform <platform>' ,
145- 'Generate for specific platform (swift)'
146- ) . choices ( [ 'swift' ] )
145+ 'Generate for specific platform (swift|kotlin )'
146+ ) . choices ( [ 'swift' , 'kotlin' ] )
147147 )
148148 . action (
149149 actionRunner ( async ( options : RunCodegenOptions ) => {
You can’t perform that action at this time.
0 commit comments