File tree Expand file tree Collapse file tree 2 files changed +11
-5
lines changed Expand file tree Collapse file tree 2 files changed +11
-5
lines changed Original file line number Diff line number Diff line change @@ -195,10 +195,6 @@ class Sourcebit {
195195 const plugin = this . pluginModules [ index ] ;
196196 const pluginName = this . getNameOfPluginAtIndex ( index ) ;
197197
198- if ( typeof plugin . transform !== 'function' ) {
199- return data ;
200- }
201-
202198 if ( typeof plugin . onTransformEnd === 'function' ) {
203199 onTransformEndCallbacks . push ( {
204200 args : {
@@ -211,6 +207,10 @@ class Sourcebit {
211207 } ) ;
212208 }
213209
210+ if ( typeof plugin . transform !== 'function' ) {
211+ return data ;
212+ }
213+
214214 return plugin . transform ( {
215215 data,
216216 debug : this . getDebugMethodForPlugin ( pluginName ) ,
Original file line number Diff line number Diff line change @@ -938,6 +938,12 @@ describe('`transform()`', () => {
938938 } ;
939939 }
940940 }
941+ } ,
942+ {
943+ module : {
944+ name : 'sourcebit-test4' ,
945+ onTransformEnd : onTransformEndFn
946+ }
941947 }
942948 ] ;
943949 const callback = jest . fn ( ) ;
@@ -950,7 +956,7 @@ describe('`transform()`', () => {
950956
951957 const data = await sourcebit . transform ( ) ;
952958
953- expect ( onTransformEndFn ) . toHaveBeenCalledTimes ( 3 ) ;
959+ expect ( onTransformEndFn ) . toHaveBeenCalledTimes ( 4 ) ;
954960
955961 onTransformEndFn . mock . calls . forEach ( call => {
956962 expect ( call [ 0 ] . debug ) . toBeInstanceOf ( Function ) ;
You can’t perform that action at this time.
0 commit comments