@@ -175,45 +175,47 @@ describe("ExtrasBlocks", () => {
175175 blockNames . forEach ( name => {
176176 const blockInstance = new mockBlockClass ( ) ;
177177
178- blockInstance . flow = jest
179- . fn ( )
180- . mockImplementation ( function ( args = [ ] , logo = { } , turtle ) {
181- if ( args . includes ( "test.abc" ) ) {
182- this . activity . save . afterSaveAbc ( "test.abc" ) ;
183- }
184- if ( args . includes ( "test.ly" ) ) {
185- this . activity . save . afterSaveLilypond ( "test.ly" ) ;
186- }
187- if ( args . includes ( "test.svg" ) ) {
188- this . activity . save . saveSVG ( "test.svg" ) ;
189- }
190- if ( this instanceof this . activity . blocks . NoBackgroundBlock ) {
191- logo . svgBackground = false ;
192- }
193- if ( this instanceof this . activity . blocks . WaitBlock ) {
194- this . activity . turtles . ithTurtle ( turtle ) ;
195- }
196- if ( this instanceof this . activity . blocks . ShowBlocksBlock ) {
197- this . activity . blocks . showBlocks ( ) ;
198- }
199- if ( this instanceof this . activity . blocks . HideBlocksBlock ) {
200- this . activity . blocks . hideBlocks ( ) ;
201- }
202- if ( this instanceof this . activity . blocks . CommentBlock ) {
203- this . activity . textMsg ( args [ 0 ] ) ;
204- }
205- if ( this instanceof this . activity . blocks . PrintBlock ) {
206- this . activity . textMsg ( args [ 0 ] ) ;
207- }
208- if ( this instanceof this . activity . blocks . DisplayGridBlock ) {
209- if ( args [ 0 ] === "Cartesian" ) {
210- this . activity . blocks . activity . _showCartesian ( ) ;
211- } else if ( args [ 0 ] === "polar" ) {
212- this . activity . blocks . activity . _showPolar ( ) ;
213- }
178+ blockInstance . flow = jest . fn ( ) . mockImplementation ( function (
179+ args = [ ] ,
180+ logo = { } ,
181+ turtle
182+ ) {
183+ if ( args . includes ( "test.abc" ) ) {
184+ this . activity . save . afterSaveAbc ( "test.abc" ) ;
185+ }
186+ if ( args . includes ( "test.ly" ) ) {
187+ this . activity . save . afterSaveLilypond ( "test.ly" ) ;
188+ }
189+ if ( args . includes ( "test.svg" ) ) {
190+ this . activity . save . saveSVG ( "test.svg" ) ;
191+ }
192+ if ( this instanceof this . activity . blocks . NoBackgroundBlock ) {
193+ logo . svgBackground = false ;
194+ }
195+ if ( this instanceof this . activity . blocks . WaitBlock ) {
196+ this . activity . turtles . ithTurtle ( turtle ) ;
197+ }
198+ if ( this instanceof this . activity . blocks . ShowBlocksBlock ) {
199+ this . activity . blocks . showBlocks ( ) ;
200+ }
201+ if ( this instanceof this . activity . blocks . HideBlocksBlock ) {
202+ this . activity . blocks . hideBlocks ( ) ;
203+ }
204+ if ( this instanceof this . activity . blocks . CommentBlock ) {
205+ this . activity . textMsg ( args [ 0 ] ) ;
206+ }
207+ if ( this instanceof this . activity . blocks . PrintBlock ) {
208+ this . activity . textMsg ( args [ 0 ] ) ;
209+ }
210+ if ( this instanceof this . activity . blocks . DisplayGridBlock ) {
211+ if ( args [ 0 ] === "Cartesian" ) {
212+ this . activity . blocks . activity . _showCartesian ( ) ;
213+ } else if ( args [ 0 ] === "polar" ) {
214+ this . activity . blocks . activity . _showPolar ( ) ;
214215 }
215- return args ;
216- } ) ;
216+ }
217+ return args ;
218+ } ) ;
217219
218220 blockInstance . arg = jest . fn ( ) . mockReturnValue ( "parsedArg" ) ;
219221
0 commit comments